[1.23.0] Shipment templates



Warning!

Resource is available only in the following countries: PL, IT

ShipmentTemplate resource object represents a serialized shipment template in the context of the organization that created it.


Structure

ShipmentTemplate resource has the following attributes:

Attribute

Type

Description

Accepted values

Availability

Attribute

Type

Description

Accepted values

Availability

name

String

Template name

 

PL, IT

status

String

Status

activated, suspended

PL, IT

description

String

Template description

 

PL, IT

serialized_data

JSON

Serialized Shipment object (Shipment API)

 

PL, IT

updated_at

DateTime

Last template update date and time.

 

PL, IT

created_at

DateTime

Template creation date and time.

 

PL, IT

ShipmentTemplate resource example JSON format:

{ "href": "https://api-shipx-pl.easypack24.net/v1/shipment_templates/1", "id": 1, "organization_id": "1", "status": "activated", "description": "description...", "serialized_data": {...}, "organization": { ... }, "updated_at": "2015-09-29T15:22:00.000+02:00", "created_at": "2015-09-29T15:22:00.000+02:00" }

 

Authentication

Resource access requires an active access token.


 

Template List

Template list within the given organization:

GET /v1/organizations/:organization_id/shipment_templates

Request example

curl -X GET https://api-shipx-pl.easypack24.net/v1/organizations/1/shipment_templates -H "Authorization: Bearer token" -H "Content-Type: application/json"

Response

 

Error information

The response can contain the following errors:

  • resource_not_found - organization for which the user wants to retrieve the template list doesn't exist or the user has no access to it.


 

Template details

Retrieving template information to which the user has access to

Request example

Response

 

Error information

The response can contain the following errors:

  • resource_not_found - template doesn't exist or the user has no access to it.


 

Template Creation

Creating a new template

Parameters

Parameter

Type

Description

Validation

Availability

Parameter

Type

Description

Validation

Availability

name

String

Template name

Required parameter.

  • Maximum length: 255

PL, IT

status

String

Template status

Required parameter.

  • Accepted values (ACTIVATED, SUSPENDED)

PL, IT

description

String

Template description

Required parameter.

  • Maximum length: 255

PL, IT

serialized_data

Shipment

serialized Shipment object

Required parameter.

PL, IT

Request example

Response

 


 

Template Editing

Edition of an existing template

Parameters

Parameter

Type

Description

Validation

Availability

Parameter

Type

Description

Validation

Availability

name

String

Template Name

Optional parameter.

  • Maximum length: 255

PL, IT

status

String

Template status

Optional parameter.

  • Accepted values (ACTIVATED, SUSPENDED

PL, IT

description

String

Template description

Optional parameter.

  • Maximum length: 255

PL, IT

serialized_data

Shipment

serialized Shipment object

Optional parameter.

PL, IT

Request example

Response

 


 

Template Deletion

Deleting an existing template.

Request example

Response