Create an order
Creates an order.
This API helps partners to integrate their order systems with Peplink. For example, when partners receive orders from their customers, partners can create order at Peplink via this API seamlessly which results in quick response to partners' customers.
Request
Body parameters
Set true if you want to test if your order is valid to create. false or leave it absent from the request if you want to create an actual order.
Turn on this flag for development, testing or debugging. Although the API always validates your inputs before creating order, it is not uncommon that you may submit valid orders during development. To avoid confusion from creating orders unexpectedly, make sure you use this flag as often as possible.
Return this value as newOrderNumber in response when isDryRun=true and the create order request is valid.
Customer email to create the order. This should represent one of your users (seats) from your partner account.
Coupon code to apply discount to the order.
Payment method for this order. Only payment terms PAYMENT_TERMS is supported now.
Other payment methods are not supported. If you submit other values, all of them are ignored now.
true if to use the default billing address configured in eStore. false if you want to use a new billing address via billingAddress.
Define a new billing address for this order. Make sure you set isUseDefaultBillingAddress to false when using new billing address.
Show child attributes
City for this address.
Company for this address.
2-char country code for this address.
State for this address.
Street address for this address.
Zip code for this address.
Ordered items in this order. Must contain at least one item.
Hardware items are not supported yet.
Show child attributes
SKU of the order item.
When is this required?
Required if purchased for serial numbers, e.g. warranty.
Serial numbers for the order item.
When is this required?
Required if purchased for ICCIDs, e.g. data plan for eSIMs.
ICCIDs for the order item.
When is this required?
Required if the order item is for generating new eSIM.
Indicates if a new eSIM is needed to generate for the order item.
When is this required?
Required if generateNewEsim is true.
Defines how much quantity to purchase for the order item.
Add note for this order.
Response
200 Order is created
A json is returned in the response body with the following fields:
Order number of the created order.
200 Dry run is successful with newOrderNumber
No order is created. The API request inputs are validated OK.
A json is returned in the response body with the following fields:
Order number given by the request parameter dryRunReturnNewOrderNumber
204 Dry run is successful without response body
No order is created. The API request inputs are validated OK.
No response body is returned.
400 Request is invalid
No order can be created as the request is invalid. This means one or more request parameters failed validation — review the body parameters above against the values you submitted to identify and correct the issue.
Examples
Dry run to create order
Request
curl -X POST 'https://portal.peplink.com/api/e/v1/cp/orders' \ -H 'Authorization: Bearer {token}' \ -H 'Content-Type: application/json' \ --data-raw '{ "isDryRun": true, "customerEmail": "[email protected]", "isUseDefaultBillingAddress": true, "orderItems": [{ "sku": "SVL-321", "serialNumbers": ["XXXX-XXXX-XXX1", "XXXX-XXXX-XXX2"] }]}'Response
No response and no order is created.Dry run to create order and return your defined order number
Request
curl -X POST 'https://portal.peplink.com/api/e/v1/cp/orders' \ -H 'Authorization: Bearer {token}' \ -H 'Content-Type: application/json' \ --data-raw '{ "isDryRun": true, "dryRunReturnNewOrderNumber": "YOUR_ORDER_NUMBER", "customerEmail": "[email protected]", "isUseDefaultBillingAddress": true, "orderItems": [{ "sku": "SVL-321", "serialNumbers": ["XXXX-XXXX-XXX1", "XXXX-XXXX-XXX2"] }]}'Response
{
"newOrderNumber": "YOUR_ORDER_NUMBER"
}Order warranty for provided serial numbers
Request
curl -X POST 'https://portal.peplink.com/api/e/v1/cp/orders' \ -H 'Authorization: Bearer {token}' \ -H 'Content-Type: application/json' \ --data-raw '{ "customerEmail": "[email protected]", "isUseDefaultBillingAddress": true, "orderItems": [{ "sku": "SVL-321", "serialNumbers": ["XXXX-XXXX-XXX1", "XXXX-XXXX-XXX2"] }]}'Response
{
"newOrderNumber": "AE12345678"
}Order data plan for provided eSIMs
Request
curl -X POST 'https://portal.peplink.com/api/e/v1/cp/orders' \ -H 'Authorization: Bearer {token}' \ -H 'Content-Type: application/json' \ --data-raw '{ "customerEmail": "[email protected]", "isUseDefaultBillingAddress": true, "orderItems": [{ "sku": "SFC-CN-A", "iccids": ["iccid_from_your_esim_1", "iccid_from_your_esim_2"] }]}'Response
{
"newOrderNumber": "AE12345678"
}Order new eSIMs with quantity
Request
curl -X POST 'https://portal.peplink.com/api/e/v1/cp/orders' \ -H 'Authorization: Bearer {token}' \ -H 'Content-Type: application/json' \ --data-raw '{"customerEmail": "[email protected]","isUseDefaultBillingAddress": true,"orderItems": [{ "sku": "SFC-CN-A", "generateNewEsim": true, "quantity": 2}]}'Response
{
"newOrderNumber": "AE12345678"
}Order with new billing address
Request
curl -X POST 'https://portal.peplink.com/api/e/v1/cp/orders' \ -H 'Authorization: Bearer {token}' \ -H 'Content-Type: application/json' \ --data-raw '{"customerEmail": "[email protected]","billingAddress": { "city": "city1", "company": "company1", "countryCode": "US", "state": "state 1", "streetAddress": "address 1", "zipCode": "zip code 1"},"orderItems": [{ "sku": "SFC-CN-A", "generateNewEsim": true, "quantity": 2}]}'Response
{
"newOrderNumber": "AE12345678"
}