Performs persist operations for a specified shipment track

POST /V1/shipment/track

Performs persist operations for a specified shipment track.

Body

  • entity object Required

    Shipment track interface. A shipment is a delivery package that contains products. A shipment document accompanies the shipment. This document lists the products and their quantities in the delivery package. Merchants and customers can track shipments.

    Hide entity attributes Show entity attributes object
    • order_id integer Required

      The order_id for the shipment package.

    • created_at string

      Created-at timestamp.

    • entity_id integer

      Shipment package ID.

    • parent_id integer Required

      Parent ID.

    • updated_at string

      Updated-at timestamp.

    • weight number Required

      Weight.

    • qty number Required

      Quantity.

    • description string Required

      Description.

    • extension_attributes object

      ExtensionInterface class for @see \Magento\Sales\Api\Data\ShipmentTrackInterface

      Hide extension_attributes attributes Show extension_attributes attributes object
      • label_filename string
      • status string
      • insured boolean
    • track_number string Required

      Track number.

    • title string Required

      Title.

    • carrier_code string Required

      Carrier code.

Responses

  • 200

    200 Success.

    Hide response attributes Show response attributes object
    • order_id integer Required

      The order_id for the shipment package.

    • created_at string

      Created-at timestamp.

    • entity_id integer

      Shipment package ID.

    • parent_id integer Required

      Parent ID.

    • updated_at string

      Updated-at timestamp.

    • weight number Required

      Weight.

    • qty number Required

      Quantity.

    • description string Required

      Description.

    • extension_attributes object

      ExtensionInterface class for @see \Magento\Sales\Api\Data\ShipmentTrackInterface

      Hide extension_attributes attributes Show extension_attributes attributes object
      • label_filename string
      • status string
      • insured boolean
    • track_number string Required

      Track number.

    • title string Required

      Title.

    • carrier_code string Required

      Carrier code.

  • 401

    401 Unauthorized

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • 400

    400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • default

    Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

POST /V1/shipment/track
curl \
 --request POST 'https://magento2.winkelstraat.mac/rest/all/V1/shipment/track' \
 --data '{"entity":{"order_id":42,"created_at":"string","entity_id":42,"parent_id":42,"updated_at":"string","weight":42.0,"qty":42.0,"description":"string","extension_attributes":{"label_filename":"string","status":"string","insured":true},"track_number":"string","title":"string","carrier_code":"string"}}'
Request examples
{
  "entity": {
    "order_id": 42,
    "created_at": "string",
    "entity_id": 42,
    "parent_id": 42,
    "updated_at": "string",
    "weight": 42.0,
    "qty": 42.0,
    "description": "string",
    "extension_attributes": {
      "label_filename": "string",
      "status": "string",
      "insured": true
    },
    "track_number": "string",
    "title": "string",
    "carrier_code": "string"
  }
}
Response examples (200)
{
  "order_id": 42,
  "created_at": "string",
  "entity_id": 42,
  "parent_id": 42,
  "updated_at": "string",
  "weight": 42.0,
  "qty": 42.0,
  "description": "string",
  "extension_attributes": {
    "label_filename": "string",
    "status": "string",
    "insured": true
  },
  "track_number": "string",
  "title": "string",
  "carrier_code": "string"
}
Response examples (401)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (400)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (default)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}