Passer au contenu principal
POST
/
v1
/
quotes
Create quote
curl --request POST \
  --url https://api.hyperline.co/v1/quotes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form customer_id=cus_QalW2vTAdkR6IY \
  --form template_id=quot_9hNWq4c84Z146W \
  --form status=draft \
  --form owner_email=joe@acme.com \
  --form invoicing_entity_id=ive_47484fjdhy5 \
  --form 'comments=Please find the contract and subscription details we discussed.' \
  --form 'terms=By signing this quote, you accept our conditions of use for the use of our products and services.' \
  --form amount=20000 \
  --form collect_payment_details=true \
  --form require_tax_id=false \
  --form display_quote_value=true \
  --form display_quote_value_with_tax=false \
  --form display_taxes=true \
  --form display_price_tiers=matching \
  --form display_phase_value=false \
  --form display_first_invoice_amount=false \
  --form display_documents_in_preview=false \
  --form display_subscription_on_update=false \
  --form generate_draft_invoices=false \
  --form automatically_start_subscription=true \
  --form expires_at=2024-04-28T14:12:09.293Z \
  --form 'subscription={
  "phases": [
    {
      "end_strategy": "duration",
      "billing_date_setting": "phase_start",
      "products": [
        {
          "id": "itm_FJKlqUb8COXw55",
          "name": "Product name",
          "description": "A description of the product.",
          "description_display_interval_dates": false,
          "payment_interval": {
            "period": "once"
          },
          "payment_schedule": "start",
          "price": {
            "type": "fee",
            "amount": 200
          },
          "prices": [
            {
              "type": "volume",
              "from": 0,
              "to": 20,
              "amount": 200,
              "unit_count": 1,
              "on_tier_incomplete": null
            },
            {
              "type": "volume",
              "from": 20,
              "to": null,
              "amount": 150,
              "unit_count": 1,
              "on_tier_incomplete": null
            }
          ],
          "count": 2,
          "unit_name": "user",
          "min_committed_count": 2,
          "min_amount": 123,
          "max_amount": 123,
          "bill_usage_difference": false,
          "credits_expiration_in_days": 123,
          "expire_credits_at_end_of_period": false
        }
      ],
      "activation_strategy": "manual",
      "name": "Name of the subscription phase.",
      "type": "standard",
      "status": "pending",
      "order": 0,
      "duration": {
        "count": 1,
        "period": "years"
      },
      "initial_billing_at": "2024-12-20T16:04:11Z",
      "starts_at": "2024-12-20T16:04:11Z",
      "ends_at": "2024-12-20T16:04:11Z",
      "billing_cycle_alignment": "anniversary",
      "do_not_invoice_phase": false,
      "transition_calculation_method": "prorata",
      "transition_invoicing_schedule": "immediately",
      "coupons": [
        {
          "id": "<string>",
          "duration_count": 123,
          "expires_at": "2024-12-20T16:04:11Z",
          "apply_at": "2024-12-20T16:04:11Z",
          "product_ids": [
            "<string>"
          ]
        }
      ]
    }
  ],
  "name": "<string>",
  "purchase_order": "<string>",
  "invoicing_entity_id": "ive_jerrb484RHn",
  "crm_opportunity_id": "<string>",
  "commitment_interval": {
    "period": "years",
    "count": 1
  },
  "renew_automatically": true,
  "renew_for": {
    "period": "years",
    "count": 1
  },
  "minimum_invoice_fee": 250,
  "starts_at": "2024-12-20T16:04:11Z",
  "contract_start": "2024-01-15T00:00:00Z",
  "contract_end": "2025-01-15T00:00:00Z",
  "initial_billing_at": "2024-12-20T16:04:11Z",
  "display_shipping_details": true,
  "cancel_at": "2024-12-20T16:04:11Z",
  "cancellation_amount": 123,
  "properties": {},
  "custom_properties": {},
  "tax_only": true,
  "generate_draft_invoices": true,
  "generate_document": true,
  "document_name": "<string>",
  "add_tax_to_document": true,
  "do_not_charge_subscription": true,
  "invoice_custom_note": "<string>"
}'
{
  "id": "quo_hXQCd5y8P3GYXa",
  "customer_id": "cus_QalW2vTAdkR6IY",
  "invoicing_entity_id": "ive_47484fjdhy5",
  "template_id": "quot_9hNWq4c84Z146W",
  "crm_opportunity_id": null,
  "number": "327",
  "comments": "Please find the contract and subscription details we discussed.",
  "terms": "By signing this quote, you accept our conditions of use for the use of our products and services.",
  "owner_email": "joe@acme.com",
  "collect_payment_details": true,
  "collect_custom_property_ids": [],
  "require_tax_id": false,
  "display_quote_value": true,
  "display_quote_value_with_tax": false,
  "display_taxes": true,
  "display_price_tiers": "matching",
  "display_phase_value": false,
  "display_first_invoice_amount": false,
  "display_documents_in_preview": false,
  "display_subscription_on_update": false,
  "post_signature_activation_enabled": true,
  "generate_draft_invoices": false,
  "attachments": [
    {
      "id": "quof_5GYXy8P3QCdaXh",
      "name": "General Conditions of Sale",
      "mimetype": "application/pdf"
    }
  ],
  "signed_file": null,
  "url": "https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa",
  "created_at": "2024-04-23T09:10:00.220Z",
  "updated_at": "2024-04-23T10:22:08.100Z",
  "status": "draft",
  "amount": 200000,
  "expires_at": null,
  "type": "subscription",
  "subscription_id": "sub_B6ClkdqNqVNBgY",
  "child_subscription_ids": [
    "sub_0z39oqdhKl0PXb"
  ]
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

multipart/form-data
customer_id
string
requis

ID of the customer.

Exemple:

"cus_QalW2vTAdkR6IY"

template_id
string
requis

ID of the quote template. If not specified, a subscription configuration or an invoice payload must be defined.

Exemple:

"quot_9hNWq4c84Z146W"

status
enum<string>

Quote status.

  • draft: The quote is a draft.
  • approved: The quote is approved and ready to be sent to the customer.
  • pending_signature: The quote is awaiting the customer's signature.
Options disponibles:
draft,
approved,
pending_signature
Exemple:

"draft"

owner_email
string<email>

Email address of the Hyperline user acting as the quote owner. If not specified, the Hyperline account owner will be assigned.

Exemple:

"joe@acme.com"

invoicing_entity_id
string

ID of the invoicing entity attached to the quote.

Exemple:

"ive_47484fjdhy5"

comments
string

Custom comments displayed on the quote.

Exemple:

"Please find the contract and subscription details we discussed."

terms
string

Custom quotation terms.

Exemple:

"By signing this quote, you accept our conditions of use for the use of our products and services."

amount
number | null

Estimated contract value. For subscription quotes, defaults to the computed subscription value if not specified. For one-off quotes, this field is ignored — the amount is always derived from the linked invoice's amount_excluding_tax.

Exemple:

20000

collect_payment_details

Collect customer payment method mandate during signature flow or not.

Exemple:

true

collect_custom_property_ids
string[]

IDs of the customer custom properties required to be filled during the signature flow.

Exemple:
[]
require_tax_id

Require the customer to provide a tax ID during the signature flow.

Exemple:

false

display_quote_value

Display the total quote value on the quote.

Exemple:

true

display_quote_value_with_tax

Display the total quote value including tax on the quote. Only applies to one_off quotes.

Exemple:

false

display_taxes

Display tax breakdown on the quote.

Exemple:

true

display_price_tiers

Controls which price tiers are displayed on the quote.

  • all: Display all pricing tiers.
  • matching: Only display the tiers used to compute the price based on quantity.
  • none: Hide all pricing tiers.
Options disponibles:
all,
matching,
none
Exemple:

"matching"

display_phase_value

Display per-phase value breakdown on the quote.

Exemple:

false

display_first_invoice_amount

Display the first invoice amount on the quote.

Exemple:

false

display_documents_in_preview

Display attached documents in the quote preview.

Exemple:

false

display_subscription_on_update

Display subscription details on subscription update quotes.

Exemple:

false

generate_draft_invoices

When true, the invoice issued after signature stays in draft status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to false.

Exemple:

false

automatically_start_subscription
obsolète

Deprecated field, please use the phase activation strategy quote_signature instead.

Exemple:

true

expires_at
string<date-time>

Quote expiration date. UTC date time string in the ISO 8601 format.

Exemple:

"2024-04-28T14:12:09.293Z"

subscription
With phases · object

Subscription configuration constituting the quote.

Réponse

201 - application/json
id
string
requis

Quote ID.

Exemple:

"quo_hXQCd5y8P3GYXa"

customer_id
string
requis

ID of the customer.

Exemple:

"cus_QalW2vTAdkR6IY"

invoicing_entity_id
string
requis

ID of the invoicing entity attached to the quote.

Exemple:

"ive_47484fjdhy5"

template_id
string | null
requis

ID of the quote template.

Exemple:

"quot_9hNWq4c84Z146W"

crm_opportunity_id
string | null
requis

ID of the related opportunity/deal in the connected CRM.

Exemple:

null

number
string
requis

Quote sequential number.

Exemple:

"327"

comments
string | null
requis

Custom comments displayed on the quote.

Exemple:

"Please find the contract and subscription details we discussed."

terms
string | null
requis

Custom quotation terms.

Exemple:

"By signing this quote, you accept our conditions of use for the use of our products and services."

owner_email
string<email> | null
requis

Email address of the Hyperline user acting as the quote owner.

Exemple:

"joe@acme.com"

collect_payment_details
boolean
requis

Collect customer payment method mandate during signature flow or not.

Exemple:

true

collect_custom_property_ids
string[]
requis

IDs of the customer custom properties required to be filled during the signature flow.

Exemple:
[]
require_tax_id
boolean
requis

Require the customer to provide a tax ID during the signature flow.

Exemple:

false

display_quote_value
boolean
requis

Display the total quote value on the quote.

Exemple:

true

display_quote_value_with_tax
boolean
requis

Display the total quote value including tax on the quote. Only applies to one_off quotes.

Exemple:

false

display_taxes
boolean
requis

Display tax breakdown on the quote.

Exemple:

true

display_price_tiers
enum<string>
requis

Controls which price tiers are displayed on the quote.

  • all: Display all pricing tiers.
  • matching: Only display the tiers used to compute the price based on quantity.
  • none: Hide all pricing tiers.
Options disponibles:
all,
matching,
none
Exemple:

"matching"

display_phase_value
boolean
requis

Display per-phase value breakdown on the quote.

Exemple:

false

display_first_invoice_amount
boolean
requis

Display the first invoice amount on the quote.

Exemple:

false

display_documents_in_preview
boolean
requis

Display attached documents in the quote preview.

Exemple:

false

display_subscription_on_update
boolean
requis

Display subscription details on subscription update quotes.

Exemple:

false

post_signature_activation_enabled
boolean
requis

Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.

Exemple:

true

generate_draft_invoices
boolean
requis

When true, the invoice issued after signature stays in draft status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to false.

Exemple:

false

attachments
object[]
requis

List of documents attached to the quote.

Exemple:
[
{
"id": "quof_5GYXy8P3QCdaXh",
"name": "General Conditions of Sale",
"mimetype": "application/pdf"
}
]
signed_file
object
requis

Final signed quote (manually uploaded).

Exemple:

null

url
string<uri> | null
requis

URL to access the quote publicly. Only applies to the pending_signature or signed quote.

Exemple:

"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"

created_at
string<date-time>
requis

Quote creation date. UTC date time string in the ISO 8601 format.

Exemple:

"2024-04-23T09:10:00.220Z"

updated_at
string<date-time>
requis

Quote update date. UTC date time string in the ISO 8601 format.

Exemple:

"2024-04-23T10:22:08.100Z"

status
enum<string>
requis

Quote status.

  • draft: The quote is a draft.
  • pending_approval: The quote is pending manager review and approval.
  • changes_requested: Some changes have been requested following manager review.
  • approved: The quote is approved and ready to be sent to the customer.
  • pending_signature: The quote is awaiting the customer's signature.
  • signed: The quote is signed and fully finalized.
  • voided: The quote is voided.
Options disponibles:
draft
Exemple:

"draft"

amount
number | null
requis

Estimated contract value.

Exemple:

200000

expires_at
string<date-time> | null
requis

Quote expiration date. UTC date time string in the ISO 8601 format.

Exemple:

null

type
enum<string>
requis

Quote type.

  • subscription: The quote will create and start a new subscription.
  • subscription_update: The quote will update an existing subscription.
  • one_off: The quote will issue an one-off invoice.
Options disponibles:
subscription,
subscription_update
Exemple:

"subscription"

subscription_id
string | null
requis

ID of the subscription attached to the quote. It corresponds to the state at the time of the quote signature. Only applies to the subscription and subscription_update quote types. The get subscription endpoint (GET /v2/subscriptions/{id}) can be used to retrieve the related details.

Exemple:

"sub_B6ClkdqNqVNBgY"

child_subscription_ids
string[]
requis

IDs of the created subscriptions from the quote. Subscriptions configuration can change after the quote signature. The get subscription endpoint (GET /v2/subscriptions/{id}) can be used to retrieve the related details.

Exemple:
["sub_0z39oqdhKl0PXb"]