Amazon - Purchase Shipment with Label Customization

Carrier: Amazon
Action: Purchase Shipment with Label Customization
Description: Example implementation for Amazon Purchase Shipment with Label Customization
{
  "carrier": "amazon",
  "action": "SubmitShipment",
  "params": {
    "client_id": "amzn1.application-oa2-client.abc123",
    "client_secret": "your-client-secret",
    "refresh_token": "Atzr|your-refresh-token",
    "application_id": "AmazonShipping_US",
    "request_token": "amzn1.rq.00607789216708.101",
    "rate_id": "12345678908c5343a087e10a5a2261ff36b83bdb5a91c6ce51b19586ed98615072005809431",
    "image_type": "ZPL",
    "label_attributes": ["PACKAGE_CLIENT_REFERENCE_ID"]
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'amazon',
  'action' => 'SubmitShipment',
  'params' => 
  array (
    'client_id' => 'amzn1.application-oa2-client.abc123',
    'client_secret' => 'your-client-secret',
    'refresh_token' => 'Atzr|your-refresh-token',
    'application_id' => 'AmazonShipping_US',
    'request_token' => 'amzn1.rq.00607789216708.101',
    'rate_id' => '12345678908c5343a087e10a5a2261ff36b83bdb5a91c6ce51b19586ed98615072005809431',
    'image_type' => 'ZPL',
    'label_attributes' => 
    array (
      0 => 'PACKAGE_CLIENT_REFERENCE_ID',
    ),
  ),
)
);

rs.request(
  {'action': 'SubmitShipment',
 'carrier': 'amazon',
 'params': {'application_id': 'AmazonShipping_US',
            'client_id': 'amzn1.application-oa2-client.abc123',
            'client_secret': 'your-client-secret',
            'image_type': 'ZPL',
            'label_attributes': ['PACKAGE_CLIENT_REFERENCE_ID'],
            'rate_id': '12345678908c5343a087e10a5a2261ff36b83bdb5a91c6ce51b19586ed98615072005809431',
            'refresh_token': 'Atzr|your-refresh-token',
            'request_token': 'amzn1.rq.00607789216708.101'}}

)

rs.request(
  {"carrier"=>"amazon",
 "action"=>"SubmitShipment",
 "params"=>
  {"client_id"=>"amzn1.application-oa2-client.abc123",
   "client_secret"=>"your-client-secret",
   "refresh_token"=>"Atzr|your-refresh-token",
   "application_id"=>"AmazonShipping_US",
   "request_token"=>"amzn1.rq.00607789216708.101",
   "rate_id"=>
    "12345678908c5343a087e10a5a2261ff36b83bdb5a91c6ce51b19586ed98615072005809431",
   "image_type"=>"ZPL",
   "label_attributes"=>["PACKAGE_CLIENT_REFERENCE_ID"]}}

)

rocketshipit.request(
  {
  "carrier": "amazon",
  "action": "SubmitShipment",
  "params": {
    "client_id": "amzn1.application-oa2-client.abc123",
    "client_secret": "your-client-secret",
    "refresh_token": "Atzr|your-refresh-token",
    "application_id": "AmazonShipping_US",
    "request_token": "amzn1.rq.00607789216708.101",
    "rate_id": "12345678908c5343a087e10a5a2261ff36b83bdb5a91c6ce51b19586ed98615072005809431",
    "image_type": "ZPL",
    "label_attributes": ["PACKAGE_CLIENT_REFERENCE_ID"]
  }
}
)
← Back to Amazon Examples

Other Amazon Examples

Authenticate
Example implementation for Amazon Authenticate
Label
Example implementation for Amazon Label
Label with Amazon Order
Example implementation for Amazon Label with Amazon Order
Purchase Shipment
Example implementation for Amazon Purchase Shipment
Rates
Example implementation for Amazon Rates
Rates with Insured Value and Items
Example implementation for Amazon Rates with Insured Value and Items
Rates with Package Reference
Example implementation for Amazon Rates with Package Reference
Tracking
Example implementation for Amazon Tracking
Void Shipment
Example implementation for Amazon Void Shipment