Get Order Packages

Updated 2 weeks ago ​by nussi

Overview

In order to get packages, you can do it in 2 ways:

  • By calling endpoint for getting packages for an order. That will be explain in this article.
  • By calling endpoint for get whole info for single order. More information in here.

Endpoint that is presented in this article is used for getting packages for a single order using pagination. If order has a lot of packages retrieving all in a single call could be resource consuming. That's why SellerCloud Rest API gives an option for pagination. In that way you can retrieve top 5 packages etc.

In order to consume the endpoint you must:

  • Be authenticated user

For information on how you can authenticate, see: Authentication

As soon as you do authentication and receive a valid token, it needs to be passed on the call when updating the order.

  • Have valid ID of an existing order

Endpoint

Example for such endpoint for TT server is https://tt.api.sellercloud.com/rest/api/Orders/Packages

For your server endpoint will be:

https://{your_server_id}.api.sellercloud.com/rest/api/Orders/Packages

Request

  • Method Type: HttpGet
  • Authorization: Use Bearer Token + token received from token authentication
  • Header info: Content-Type: application/json
  • Body data:

    Parameter

    Data Type

    Description

    Is Required

    id

    integer

    ID of existing order.

    Yes

    pageNumber

    integer

    Number of the page.

    Yes

    pageSize

    integer

    Number of packages per page.

    Yes

Response

  • If server error appears, then response will be with status code 500 => Internal Server Error
  • If getting order packages is successful, response will be with following format:
{
"Results":
[
{
"ID": 3123213,
"TrackingNumber": "3123131313131",
"Length": 0,
"Width": 0,
"Height": 0,
"Wight": 0,
"ShippingCost": 0.0,
"EstimatedDeliveryDate": "2019-02-08T19:09:24",
"DeliveryStatus": 0,
"DeclaredValue": 0
}
],
"TotalResults": 1
}


How did we do?