Skip to content

Latest commit

 

History

History
168 lines (115 loc) · 6.39 KB

File metadata and controls

168 lines (115 loc) · 6.39 KB

ShippingApi.ManifestsApi

All URIs are relative to https://api-sandbox.pitneybowes.com/shippingservices

Method HTTP request Description
createManifest POST /v1/manifests This operation creates an end-of-day manifest
reprintManifest GET /v1/manifests/{manifestId} reprintManifest
retryManifest GET /v1/manifests retryManifest

createManifest

Manifest createManifest(xPBTransactionId, manifest, opts)

This operation creates an end-of-day manifest

This operation creates an end-of-day manifest that either combines all parcels into a single form or electronically closes the day, depending on the carrier. Use the instructions appropriate to the carrier. * Create a USPS SCAN Form * Create a Newgistics Closeout * Create a PB Presort Pickup Slip * Create a Manifest for PMOD Shipments

Example

import ShippingApi from 'ShippingAPI';
let defaultClient = ShippingApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
let oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ShippingApi.ManifestsApi();
let xPBTransactionId = "xPBTransactionId_example"; // String | Required. A unique identifier for the transaction, up to 25 characters.
let manifest = {"carrier":"usps","parcelTrackingNumbers":["9405509898644518132830"],"submissionDate":"2020-07-08","fromAddress":{"company":"Pitney Bowes Inc.","name":"sender_fname","phone":"2032032033","email":"sender@email.com","residential":true,"addressLines":["27 Waterview Drive"],"cityTown":"Shelton","stateProvince":"CT","postalCode":"06484","countryCode":"US"}}; // Manifest | manifest
let opts = {
  'xPBUnifiedErrorStructure': true // Boolean | Set this to true to use the standard [error object](https://shipping.pitneybowes.com/reference/error-object.html#standard-error-object) if an error occurs.
};
apiInstance.createManifest(xPBTransactionId, manifest, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
xPBTransactionId String Required. A unique identifier for the transaction, up to 25 characters.
manifest Manifest manifest
xPBUnifiedErrorStructure Boolean Set this to true to use the standard error object if an error occurs. [optional] [default to true]

Return type

Manifest

Authorization

oAuth2ClientCredentials

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

reprintManifest

Manifest reprintManifest(manifestId, opts)

reprintManifest

Example

import ShippingApi from 'ShippingAPI';
let defaultClient = ShippingApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
let oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ShippingApi.ManifestsApi();
let manifestId = "manifestId_example"; // String | manifestId
let opts = {
  'xPBUnifiedErrorStructure': true // Boolean | Set this to true to use the standard [error object](https://shipping.pitneybowes.com/reference/error-object.html#standard-error-object) if an error occurs.
};
apiInstance.reprintManifest(manifestId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
manifestId String manifestId
xPBUnifiedErrorStructure Boolean Set this to true to use the standard error object if an error occurs. [optional] [default to true]

Return type

Manifest

Authorization

oAuth2ClientCredentials

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

retryManifest

Manifest retryManifest(originalTransactionId, opts)

retryManifest

Example

import ShippingApi from 'ShippingAPI';
let defaultClient = ShippingApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
let oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ShippingApi.ManifestsApi();
let originalTransactionId = "originalTransactionId_example"; // String | 
let opts = {
  'xPBUnifiedErrorStructure': true // Boolean | Set this to true to use the standard [error object](https://shipping.pitneybowes.com/reference/error-object.html#standard-error-object) if an error occurs.
};
apiInstance.retryManifest(originalTransactionId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
originalTransactionId String
xPBUnifiedErrorStructure Boolean Set this to true to use the standard error object if an error occurs. [optional] [default to true]

Return type

Manifest

Authorization

oAuth2ClientCredentials

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json