Quotes

Properties

  • Name
    object
    Type
    string
    Description

    Type of object is always quote.

  • Name
    id
    Type
    string
    Description

    Unique identifier for the quote.

    Example: quo_0SNlurA049MEWV2X9NicYieFQ4Kc
  • Name
    address
    Type
    nullable string
    Description

    The unique identifier for the address that the taxes were quoted for.

    Example: adr_0SNlurA049MEWV5ELDmnaqVXgTFT
  • Name
    createdAt
    Type
    string
    Description

    Time when the quote was created.

    Example: 2024-01-09T15:00:51Z
  • Name
    expiredAt
    Type
    string
    Description

    The timestamp indicating when the quote expires. Set to 2 hours after the quote's creation time.

    Example: 2024-02-01T11:12:13Z
  • Name
    fees
    Type
    array
    Description
    The fees for the quote.
    • Name
      amount
      Type
      object
      Description
      The amount of the fee.
    • Name
      name
      Type
      string
      Description

      The name of the fee.

      Example: Recovery Fee
    • Name
      type
      Type
      string
      Description

      The type of the fee.

  • Name
    lineItems
    Type
    array
    Description
    The line items that make up the quote.
  • Name
    subtotal
    Type
    object
    Description
    The total amount discounting any taxes or fees.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    tax
    Type
    object
    Description
    The total amount of taxes. This is the sum of the taxes of each line item.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    taxExemptionReason
    Type
    nullable string
    Description

    The reason for the taxes not being calculated, if any. It can have one of the following values:

    • calculationFailed: The tax calculation failed.
    • userExempted: The user is marked as exempted from taxes.
    Example: calculationFailed
    Allowed values: , calculationFailed, userExempted
  • Name
    total
    Type
    object
    Description
    The total amount after all taxes and fees are applied.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    user
    Type
    string
    Description

    The unique identifier for the user that this quote relates to.

    Example: usr_0SNlurA049MEWV4OpCwsNyC9Kn2d

Response

{
  "object": "quote",
  "id": "quo_0SNlurA049MEWV2X9NicYieFQ4Kc",
  "address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
  "createdAt": "2024-01-09T15:00:51Z",
  "expiredAt": "2024-02-01T11:12:13Z",
  "subtotal": {
    "amount": 999,
    "currency": "USD"
  },
  "tax": {
    "amount": 999,
    "currency": "USD"
  },
  "taxExemptionReason": "calculationFailed",
  "total": {
    "amount": 999,
    "currency": "USD"
  },
  "user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}

GET/projects/{project}/quotes/{quote}

Retrieve a quote

Retrieves the details of an existing quote.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    quote
    Type
    string
    required
    Description

    The unique identifier for the quote.

    Example: quo_0SNlurA049MEWV2X9NicYieFQ4Kc

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always quote.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the quote.

    Example: quo_0SNlurA049MEWV2X9NicYieFQ4Kc
  • Name
    address
    Type
    nullable string
    required
    Description

    The unique identifier for the address that the taxes were quoted for.

    Example: adr_0SNlurA049MEWV5ELDmnaqVXgTFT
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the quote was created.

    Example: 2024-01-09T15:00:51Z
  • Name
    expiredAt
    Type
    string
    required
    Description

    The timestamp indicating when the quote expires. Set to 2 hours after the quote's creation time.

    Example: 2024-02-01T11:12:13Z
  • Name
    fees
    Type
    array
    required
    Description
    The fees for the quote.
    • Name
      amount
      Type
      object
      Description
      The amount of the fee.
    • Name
      name
      Type
      string
      Description

      The name of the fee.

      Example: Recovery Fee
    • Name
      type
      Type
      string
      Description

      The type of the fee.

  • Name
    lineItems
    Type
    array
    required
    Description
    The line items that make up the quote.
  • Name
    subtotal
    Type
    object
    required
    Description
    The total amount discounting any taxes or fees.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    tax
    Type
    object
    required
    Description
    The total amount of taxes. This is the sum of the taxes of each line item.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    taxExemptionReason
    Type
    nullable string
    required
    Description

    The reason for the taxes not being calculated, if any. It can have one of the following values:

    • calculationFailed: The tax calculation failed.
    • userExempted: The user is marked as exempted from taxes.
    Example: calculationFailed
    Allowed values: , calculationFailed, userExempted
  • Name
    total
    Type
    object
    required
    Description
    The total amount after all taxes and fees are applied.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    user
    Type
    string
    required
    Description

    The unique identifier for the user that this quote relates to.

    Example: usr_0SNlurA049MEWV4OpCwsNyC9Kn2d

Request

GET
/projects/{project}/quotes/{quote}
curl https://api.gigs.com/projects/{project}/quotes/{quote} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"

Response

{
  "object": "quote",
  "id": "quo_0SNlurA049MEWV2X9NicYieFQ4Kc",
  "address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
  "createdAt": "2024-01-09T15:00:51Z",
  "expiredAt": "2024-02-01T11:12:13Z",
  "fees": [
    {
      "amount": {
        "amount": 100,
        "currency": "USD"
      },
      "name": "Recovery Fee",
      "type": "recoveryFee"
    }
  ],
  "lineItems": [
    {
      "addon": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
      "plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
      "subtotal": {
        "amount": 999,
        "currency": "USD"
      },
      "tax": {
        "amount": 200,
        "currency": "USD"
      },
      "taxes": [
        {
          "amount": {
            "amount": 990,
            "currency": "USD"
          },
          "inclusive": false,
          "jurisdiction": "Federal",
          "name": "Federal TRS Fund"
        }
      ],
      "total": {
        "amount": 1099,
        "currency": "USD"
      }
    }
  ],
  "subtotal": {
    "amount": 999,
    "currency": "USD"
  },
  "tax": {
    "amount": 200,
    "currency": "USD"
  },
  "taxExemptionReason": "calculationFailed",
  "total": {
    "amount": 1199,
    "currency": "USD"
  },
  "user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}

POST/projects/{project}/quotes

Create a quote

Creates a quote for the given plan or add-on, allowing you to preview its final price with all applicable taxes and fees.

Body

  • Name
    addon
    Type
    nullable string
    Description

    The unique identifier for the addon for which this quote is being created. Either plan or addon should be present, but not both.

    Example: add_0SNlurA049MEWV4VxLfwJc7PJtHc
  • Name
    address
    Type
    nullable string
    Description

    The unique identifier representing the address for tax calculation purposes.

    Example: adr_0SNlurA049MEWV5ELDmnaqVXgTFT
  • Name
    plan
    Type
    nullable string
    Description

    The unique identifier for the plan for which this quote is being created. Either plan or addon should be present, but not both.

    Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
  • Name
    user
    Type
    string
    required
    Description

    The unique identifier for the user for which this quote is being created.

    Example: usr_0SNlurA049MEWV4OpCwsNyC9Kn2d

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always quote.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the quote.

    Example: quo_0SNlurA049MEWV2X9NicYieFQ4Kc
  • Name
    address
    Type
    nullable string
    required
    Description

    The unique identifier for the address that the taxes were quoted for.

    Example: adr_0SNlurA049MEWV5ELDmnaqVXgTFT
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the quote was created.

    Example: 2024-01-09T15:00:51Z
  • Name
    expiredAt
    Type
    string
    required
    Description

    The timestamp indicating when the quote expires. Set to 2 hours after the quote's creation time.

    Example: 2024-02-01T11:12:13Z
  • Name
    fees
    Type
    array
    required
    Description
    The fees for the quote.
    • Name
      amount
      Type
      object
      Description
      The amount of the fee.
    • Name
      name
      Type
      string
      Description

      The name of the fee.

      Example: Recovery Fee
    • Name
      type
      Type
      string
      Description

      The type of the fee.

  • Name
    lineItems
    Type
    array
    required
    Description
    The line items that make up the quote.
  • Name
    subtotal
    Type
    object
    required
    Description
    The total amount discounting any taxes or fees.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    tax
    Type
    object
    required
    Description
    The total amount of taxes. This is the sum of the taxes of each line item.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    taxExemptionReason
    Type
    nullable string
    required
    Description

    The reason for the taxes not being calculated, if any. It can have one of the following values:

    • calculationFailed: The tax calculation failed.
    • userExempted: The user is marked as exempted from taxes.
    Example: calculationFailed
    Allowed values: , calculationFailed, userExempted
  • Name
    total
    Type
    object
    required
    Description
    The total amount after all taxes and fees are applied.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    user
    Type
    string
    required
    Description

    The unique identifier for the user that this quote relates to.

    Example: usr_0SNlurA049MEWV4OpCwsNyC9Kn2d

Request

POST
/projects/{project}/quotes
curl https://api.gigs.com/projects/{project}/quotes \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"addon\":\"add_0SNlurA049MEWV4VxLfwJc7PJtHc\",\"address\":\"adr_0SNlurA049MEWV5ELDmnaqVXgTFT\",\"plan\":\"pln_0SNlurA049MEWV3V0q7gjQbM4EVo\",\"user\":\"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d\"}"

Response

{
  "object": "quote",
  "id": "quo_0SNlurA049MEWV2X9NicYieFQ4Kc",
  "address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
  "createdAt": "2024-01-09T15:00:51Z",
  "expiredAt": "2024-02-01T11:12:13Z",
  "fees": [
    {
      "amount": {
        "amount": 100,
        "currency": "USD"
      },
      "name": "Recovery Fee",
      "type": "recoveryFee"
    }
  ],
  "lineItems": [
    {
      "addon": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
      "plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
      "subtotal": {
        "amount": 999,
        "currency": "USD"
      },
      "tax": {
        "amount": 200,
        "currency": "USD"
      },
      "taxes": [
        {
          "amount": {
            "amount": 990,
            "currency": "USD"
          },
          "inclusive": false,
          "jurisdiction": "Federal",
          "name": "Federal TRS Fund"
        }
      ],
      "total": {
        "amount": 1099,
        "currency": "USD"
      }
    }
  ],
  "subtotal": {
    "amount": 999,
    "currency": "USD"
  },
  "tax": {
    "amount": 200,
    "currency": "USD"
  },
  "taxExemptionReason": "calculationFailed",
  "total": {
    "amount": 1199,
    "currency": "USD"
  },
  "user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
}