Step 3: Execute order

This tutorial walks you through the steps required to update an order's status to EXECUTED using the Subskribe API.

After you create an order in Step 1 and update order details in Step 2, the order status follows this progression:

  1. DRAFTSUBMITTED. You must use the API to update the status to SUBMITTED indicating that the order has been submitted for internal approvals. This status update triggers pre-configured approval workflows.
  2. SUBMITTEDAPPROVED. This transition happens automatically after all required approvals are provided.
  3. APPROVEDEXECUTED. You must update the order status to EXECUTED to create a subscription.

You can make status changes to the order using the Update order status endpoint.

Prerequisites

To update an order's status, you'll need:

  • Your Subskribe API key.
  • The ID of the order whose status you want to update. You can find the order ID in the response from the Create an order endpoint in Step 1.

Prerequisites that are specific to a status update are documented in the relevant sections below.

Step 3a. Update the order status to SUBMITTED

When you submit the order for internal review and approval, update the order's status to SUBMITTED.

🚧

Once you update an order's status to SUBMITTED, you can make very limited modifications to the order without updating it back to the DRAFT status.

While in the SUBMITTED status you can modify details such as:

  • Order name (name)
  • Shipping and billing contact IDs (shippingContactId, billingContactId)
  • Purchase Order (PO) number (purchaseOrderNumber)
  • The CRM where the opportunity associated with the order is managed (opportunityCrmType)

Prerequisites

To update the order's status to SUBMITTED, your order must:

  • Contain both shippingContactId and billingContactId fields.

Constructing the request

The Update order status endpoint requires the order id and order status path parameters.

id
  • Type: string
    • Value: ORD-91P88TH
    • Description: The ID of the order whose status you want to update.
status
  • Type: string, enum
    • Value: SUBMITTED
    • Description: The status that you want to update the order to. Supported values are DRAFT, SUBMITTED, EXECUTED, and CANCELLED.

Sample request

The request to update the order's status to SUBMITTED looks as follows:

curl -X PUT "https://api.app.subskribe.com/orders/ORD-91P88TH/status/SUBMITTED" \
  -H "X-API-Key: <your-api-key>" \
  -H "Content-Type: application/json"

Success response

A 200 OK response indicates that the order's status was successfully updated.

Order status changes to APPROVED

Updating the order's status to SUBMITTED automatically triggers pre-configured approval workflows. Once all required approvals are given, the order's status is automatically updated to APPROVED. An order in the APPROVED status is ready to be executed.

📘

If no pre-configured approval workflows exist, the order status automatically transitions from SUBMITTED to APPROVED.

Step 3b. Update order status to EXECUTED

Updating an order's status to EXECUTED creates a subscription.

Prerequisites

To update the order's status to EXECUTED, your order must be in the APPROVED status.

Constructing the request

The Update order status endpoint requires the order id and order status path parameters.

id
  • Type: string
    • Value: ORD-91P88TH
    • Description: The ID of the order whose status you want to update.
status
  • Type: string, enum
    • Value: EXECUTED
    • Description: The status that you want to update the order to. Supported values are DRAFT, SUBMITTED, EXECUTED, and CANCELLED.

Sample request

The request to update the order's status to EXECUTED looks as follows:

curl -X PUT "https://api.app.subskribe.com/orders/ORD-91P88TH/status/EXECUTED" \
  -H "X-API-Key: <your-api-key>" \
  -H "Content-Type: application/json"

Success response

A 200 OK response indicates that the order's status was successfully updated.

Error handling

Error codeError detailsRecovery options
401 UnauthorizedInvalid API keyThe most likely cause is that your API key is missing or it has expired. Try again with valid API credentials.
404 Not FoundOrder does not existThe id you specified in the request URL refers to an order that doesn't exist. Try again with a valid order ID.
400 Bad RequestUnsupported order status valueThis error is likely caused by a misspelled status name, such as EXECTED instead of EXECUTED. Try again with the correct status value.


Did this page help you?