Get Subscription Id Using New Commerce Order Id¶
After using Create New Commerce Orders endpoint to create a new Nce subscription, a user can use this endpoint to retrieve the subscription id of the newly created subscription.
The returned subscription id can be used to retrieve full subscription details from the Get subscription endpoint.
Request¶
Request Syntax:
Method |
Request URI |
---|---|
GET |
https://api.crayon.com/api/v1/subscriptions/new-commerce-orders/{newCommerceOrderid} |
Properties:
Name |
Type |
Required |
Description |
---|---|---|---|
newCommerceOrderid |
guid |
Yes |
Order id returned from Create New Commerce Orders |
Remark:
The “newCommerceOrderid” variable is included in the URL and should not be sent as a separate parameter.
Sample:
https://api.crayon.com/api/v1/subscriptions/new-commerce-orders/767bc43f-c3af-48e7-b7fa-89889132a655
Response¶
If successful, a list of subscription ids is returned in the response body.
[ 123 ]
Remark:
If the return value is empty, the order has not yet been processed.
Response success and error codes:
Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use a network trace tool to read this code, error type, and additional parameters.
Error Codes |
Description |
---|---|
200 Ok |
The request has succeeded. |
400 Bad Request |
The request could not be understood by the server due to malformed syntax, missing required properties, properties that couldn’t be parsed according to their type (and length). It is a non-retryable error condition. The client should not repeat the request without modifications. |
401 Unauthorized |
The request requires user authentication. If the request already included Authorization credentials, then the 401 (Unauthorized) status code means that authorization has been refused for those credentials. It is a non-retryable error condition. |
404 Not Found |
The server has not found anything matching the request. |