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:
DRAFT→SUBMITTED. You must use the API to update the status toSUBMITTEDindicating that the order has been submitted for internal approvals. This status update triggers pre-configured approval workflows.SUBMITTED→APPROVED. This transition happens automatically after all required approvals are provided.APPROVED→EXECUTED. You must update the order status toEXECUTEDto 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
SUBMITTEDWhen 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 theDRAFTstatus.While in the
SUBMITTEDstatus 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
shippingContactIdandbillingContactIdfields.
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.
- Value:
status
- Type:
string,enum- Value:
SUBMITTED - Description: The status that you want to update the order to. Supported values are
DRAFT,SUBMITTED,EXECUTED, andCANCELLED.
- Value:
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
APPROVEDUpdating 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
SUBMITTEDtoAPPROVED.
Step 3b. Update order status to EXECUTED
EXECUTEDUpdating 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.
- Value:
status
- Type:
string,enum- Value:
EXECUTED - Description: The status that you want to update the order to. Supported values are
DRAFT,SUBMITTED,EXECUTED, andCANCELLED.
- Value:
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 code | Error details | Recovery options |
|---|---|---|
| 401 Unauthorized | Invalid API key | The most likely cause is that your API key is missing or it has expired. Try again with valid API credentials. |
| 404 Not Found | Order does not exist | The id you specified in the request URL refers to an order that doesn't exist. Try again with a valid order ID. |
| 400 Bad Request | Unsupported order status value | This error is likely caused by a misspelled status name, such as EXECTED instead of EXECUTED. Try again with the correct status value. |
Updated 9 days ago
