Filter handling units' customs information relating to the merchandise by reference or by S)ONE ID.

GET /customs

Sample request

GET /customs?reference=AAAU1234566&spi=CNI1234567890&limit=5&offset=0&desc=true

Query parameters

  • reference string

    Handling unit reference with which to filter.

    Default value is empty.

  • spi string

    Handling unit ID with which to filter. ID corresponds to the single passage identification in S)ONE.

    Default value is empty.

  • desc boolean

    Boolean that indicates the sort order. If it is set to true, results will be sorted by descending order.

    Default value is false.

  • limit integer(int32)

    Number of results to be returned. Max value is 10.

    Default value is 5.

  • offset integer(int32)

    Index of the first returned result.

    Default value is 0.

Responses

  • 200 application/json

    Success

    Hide response attributes Show response attributes object
    • total integer(int32)

      Total amount of objects matching given parameters.

    • returned integer(int32)

      Amount of objects returned by the paginated query.

    • first integer(int32)

      Index of the first returned object.

    • items array[object] | null

      Items returned by the query.

      Customs information

      Hide items attributes Show items attributes object
      • reference string | null

        Reference

      • spi string | null

        Spi

      • customsInformationsItems array[object] | null

        Customs information

        Customs information item.

        Hide customsInformationsItems attributes Show customsInformationsItems attributes object
        • commodityCode string | null

          Commodity code

        • commodityCodeType string | null

          Nomenclature

        • mrn string | null

          MRN information

        • mrnItem integer(int32) | null

          MRN article

        • document string | null

          Customs document

        • status string | null

          Customs status

        • Additional properties are NOT allowed
      • Additional properties are NOT allowed
    • Additional properties are NOT allowed
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • status string | null

      Http error status.

    • timestamp string(date-time)

      Error date.
      ISO 8601 Extended Format

    • code string | null

      Business error code.
      The possible values are :
      - R001 : No handling unit was found
      - R002 : The handling unit is null
      - R003 : The handling unit is not correctly formated

    • message string | null

      Error message.

    • Additional properties are NOT allowed
  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • status string | null

      Http error status.

    • timestamp string(date-time)

      Error date.
      ISO 8601 Extended Format

    • code string | null

      Business error code.
      The possible values are :
      - R001 : No handling unit was found
      - R002 : The handling unit is null
      - R003 : The handling unit is not correctly formated

    • message string | null

      Error message.

    • Additional properties are NOT allowed
GET /customs
curl \
 --request GET 'https://soget-api-integration.azure-api.net/api-customs/v1/customs'
Response examples (200)
{
  "total": 3,
  "returned": 1,
  "first": 0,
  "items": [
    {
      "reference": "string",
      "spi": "string",
      "customsInformationsItems": [
        {
          "commodityCode": "string",
          "commodityCodeType": "string",
          "mrn": "string",
          "mrnItem": 42,
          "document": "string",
          "status": "string"
        }
      ]
    }
  ]
}
Response examples (400)
{
  "status": "NotFound",
  "timestamp": "2022-11-17T15:40:39.8381389Z",
  "code": "R001",
  "message": "No handling unit was found"
}
Response examples (404)
{
  "status": "NotFound",
  "timestamp": "2022-11-17T15:40:39.8381389Z",
  "code": "R001",
  "message": "No handling unit was found"
}