Quotes provide a preview of the invoices, including taxes and fees, that will occur when creating a subscription or add-on.
Type of object is always quote.
quote Unique identifier for the quote.
"quo_0SNlurA049MEWV2X9NicYieFQ4Kc"The unique identifier for the address that the taxes were quoted for. Present when quoting local plans.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"Time when the quote was created.
"2024-01-09T15:00:51Z"{"amount":100,"currency":"USD"}The timestamp indicating when the quote expires. Set to 2 hours after the quote's creation time.
"2024-02-01T11:12:13Z"{"amount":100,"currency":"USD"}The name of the fee.
"Recovery Fee"The type of the fee.
recoveryFee The reason this quote was created. It can have one of the following values:
subscriptionCreation: The quote is for a new subscription.subscriptionChange: The quote is for a subscription change (e.g. plan upgrade).other: The quote is not related to a subscription but due an e.g. one-time addon.other subscriptionChange subscriptionCreation {"amount":999,"currency":"USD"}{"amount":200,"currency":"USD"}The reason for the taxes not being calculated, if any. It can have one of the following values:
calculationFailed: The tax calculation failed for an unspecified reason.inclusiveTaxExceedsPrice: The calculated tax is too large to be included in the price.fullyDiscounted: The quote is fully discounted due to a voucher or a free product.userExempted: The user is marked as exempted from taxes."calculationFailed"calculationFailed fullyDiscounted inclusiveTaxExceedsPrice userExempted {"amount":1199,"currency":"USD"}The unique identifier for the user that this quote belongs to.
"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"The unique identifier for the voucher applied to the quote, if any.
"vou_0SNlurA049MEWV0h2jfjkdiOdplN"{
"object": "quote",
"id": "quo_0SNlurA049MEWV2X9NicYieFQ4Kc",
"address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"createdAt": "2024-01-09T15:01:51.0Z",
"discount": {
"amount": 100,
"currency": "USD"
},
"expiredAt": "2024-02-01T11:12:13.0Z",
"fees": [
{
"amount": {
"amount": 100,
"currency": "USD"
},
"name": "Recovery Fee",
"type": "recoveryFee"
}
],
"lineItems": [
{
"addon": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"creditedPlan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"discount": {
"amount": 100,
"currency": "USD"
},
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"subtotal": {
"amount": 999,
"currency": "USD"
},
"tax": {
"amount": 200,
"currency": "USD"
},
"taxes": [
{
"amount": {
"amount": 200,
"currency": "USD"
},
"inclusive": false,
"jurisdiction": "Federal",
"name": "Federal TRS Fund"
}
],
"total": {
"amount": 1099,
"currency": "USD"
}
}
],
"reason": "other",
"subtotal": {
"amount": 999,
"currency": "USD"
},
"tax": {
"amount": 200,
"currency": "USD"
},
"taxExemptionReason": "calculationFailed",
"total": {
"amount": 1199,
"currency": "USD"
},
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN"
}
Creates a quote for the given plan or add-on, allowing you to preview its final price with all applicable taxes and fees.
The unique identifier for the addon for which this quote is being created. Either plan or addon should be present, but not both.
"add_0SNlurA049MEWV4VxLfwJc7PJtHc"The unique identifier representing the address for tax calculation purposes. Required when quoting local plans or addons for local plans.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"The unique identifier for the credited plan this quote is being created with. The price of the credited plan is used to adjust the final plan price when quoting immediate subscription changes.
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"The unique identifier for the plan for which this quote is being created. Either plan or addon should be present, but not both.
"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"The unique identifier for the user for which this quote is being created.
"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"The unique identifier for the voucher to apply to this quote.
"vou_0SNlurA049MEWV0h2jfjkdiOdplN"Returns the created quote.
Type of object is always quote.
quote Unique identifier for the quote.
"quo_0SNlurA049MEWV2X9NicYieFQ4Kc"The unique identifier for the address that the taxes were quoted for. Present when quoting local plans.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"Time when the quote was created.
"2024-01-09T15:00:51Z"{"amount":100,"currency":"USD"}The timestamp indicating when the quote expires. Set to 2 hours after the quote's creation time.
"2024-02-01T11:12:13Z"{"amount":100,"currency":"USD"}The name of the fee.
"Recovery Fee"The type of the fee.
recoveryFee The reason this quote was created. It can have one of the following values:
subscriptionCreation: The quote is for a new subscription.subscriptionChange: The quote is for a subscription change (e.g. plan upgrade).other: The quote is not related to a subscription but due an e.g. one-time addon.other subscriptionChange subscriptionCreation {"amount":999,"currency":"USD"}{"amount":200,"currency":"USD"}The reason for the taxes not being calculated, if any. It can have one of the following values:
calculationFailed: The tax calculation failed for an unspecified reason.inclusiveTaxExceedsPrice: The calculated tax is too large to be included in the price.fullyDiscounted: The quote is fully discounted due to a voucher or a free product.userExempted: The user is marked as exempted from taxes."calculationFailed"calculationFailed fullyDiscounted inclusiveTaxExceedsPrice userExempted {"amount":1199,"currency":"USD"}The unique identifier for the user that this quote belongs to.
"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"The unique identifier for the voucher applied to the quote, if any.
"vou_0SNlurA049MEWV0h2jfjkdiOdplN"curl https://api.gigs.com/projects/${GIGS_PROJECT}/quotes \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json" \
-d '{
"addon": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"creditedPlan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN"
}'
{
"object": "quote",
"id": "quo_0SNlurA049MEWV2X9NicYieFQ4Kc",
"address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"createdAt": "2024-01-09T15:00:51Z",
"discount": {
"amount": 100,
"currency": "USD"
},
"expiredAt": "2024-02-01T11:12:13Z",
"fees": [
{
"amount": {
"amount": 100,
"currency": "USD"
},
"name": "Recovery Fee",
"type": "recoveryFee"
}
],
"lineItems": [
{
"addon": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"creditedPlan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"discount": {
"amount": 100,
"currency": "USD"
},
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"subtotal": {
"amount": 999,
"currency": "USD"
},
"tax": {
"amount": 200,
"currency": "USD"
},
"taxes": [
{
"amount": {
"amount": 200,
"currency": "USD"
},
"inclusive": false,
"jurisdiction": "Federal",
"name": "Federal TRS Fund"
}
],
"total": {
"amount": 1099,
"currency": "USD"
}
}
],
"reason": "other",
"subtotal": {
"amount": 999,
"currency": "USD"
},
"tax": {
"amount": 200,
"currency": "USD"
},
"taxExemptionReason": "calculationFailed",
"total": {
"amount": 1199,
"currency": "USD"
},
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN"
}
Returns the quote.
Type of object is always quote.
quote Unique identifier for the quote.
"quo_0SNlurA049MEWV2X9NicYieFQ4Kc"The unique identifier for the address that the taxes were quoted for. Present when quoting local plans.
"adr_0SNlurA049MEWV5ELDmnaqVXgTFT"Time when the quote was created.
"2024-01-09T15:00:51Z"{"amount":100,"currency":"USD"}The timestamp indicating when the quote expires. Set to 2 hours after the quote's creation time.
"2024-02-01T11:12:13Z"{"amount":100,"currency":"USD"}The name of the fee.
"Recovery Fee"The type of the fee.
recoveryFee The reason this quote was created. It can have one of the following values:
subscriptionCreation: The quote is for a new subscription.subscriptionChange: The quote is for a subscription change (e.g. plan upgrade).other: The quote is not related to a subscription but due an e.g. one-time addon.other subscriptionChange subscriptionCreation {"amount":999,"currency":"USD"}{"amount":200,"currency":"USD"}The reason for the taxes not being calculated, if any. It can have one of the following values:
calculationFailed: The tax calculation failed for an unspecified reason.inclusiveTaxExceedsPrice: The calculated tax is too large to be included in the price.fullyDiscounted: The quote is fully discounted due to a voucher or a free product.userExempted: The user is marked as exempted from taxes."calculationFailed"calculationFailed fullyDiscounted inclusiveTaxExceedsPrice userExempted {"amount":1199,"currency":"USD"}The unique identifier for the user that this quote belongs to.
"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"The unique identifier for the voucher applied to the quote, if any.
"vou_0SNlurA049MEWV0h2jfjkdiOdplN"curl https://api.gigs.com/projects/${GIGS_PROJECT}/quotes/{quote} \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "quote",
"id": "quo_0SNlurA049MEWV2X9NicYieFQ4Kc",
"address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"createdAt": "2024-01-09T15:00:51Z",
"discount": {
"amount": 100,
"currency": "USD"
},
"expiredAt": "2024-02-01T11:12:13Z",
"fees": [
{
"amount": {
"amount": 100,
"currency": "USD"
},
"name": "Recovery Fee",
"type": "recoveryFee"
}
],
"lineItems": [
{
"addon": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"creditedPlan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"discount": {
"amount": 100,
"currency": "USD"
},
"plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"subtotal": {
"amount": 999,
"currency": "USD"
},
"tax": {
"amount": 200,
"currency": "USD"
},
"taxes": [
{
"amount": {
"amount": 200,
"currency": "USD"
},
"inclusive": false,
"jurisdiction": "Federal",
"name": "Federal TRS Fund"
}
],
"total": {
"amount": 1099,
"currency": "USD"
}
}
],
"reason": "other",
"subtotal": {
"amount": 999,
"currency": "USD"
},
"tax": {
"amount": 200,
"currency": "USD"
},
"taxExemptionReason": "calculationFailed",
"total": {
"amount": 1199,
"currency": "USD"
},
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN"
}