RegisterShipmentDocument
Registers a document against a shipment and returns pre-signed S3 upload credentials.
Procedure Specific Information
Registers a document against a shipment and returns pre-signed S3 upload credentials. This procedure does not upload the file — it registers the document and returns a pre-signed Amazon S3 upload URL. Use the returned UploadUrl to upload the file via an HTTP POST. ShipmentId, Type, and FileName are required. The procedure is executed as below:
EXEC RegisterShipmentDocument ShipmentId='se-28529731', Type='commercial_invoice', FileName='invoice.pdf'
EXEC RegisterShipmentDocument ShipmentId='se-28529731', Type='packing_list', FileName='packing.pdf', Format='PDF'
Input
| Name | Type | Description |
| ShipmentId | String | The Id of the shipment. |
| Type | String | The type of document being registered.
The allowed values are commercial_invoice, certificate_of_origin, usmca_commercial_invoice_certification_of_origin, usmca_certification_of_origin, pro_forma_invoice, other, authorization_form, export_accompanying_document, export_license, import_permit, one_time_nafta, power_of_attorney, packing_list, sed_document, shippers_letter_of_instruction, declaration, section_232_customs_affidavit. |
| FileName | String | The file name of the document, including its extension. |
| Format | String | The file format of the document. Defaults to PDF when omitted.
The allowed values are PDF, PNG. |
Result Set Columns
| Name | Type | Description |
| DocumentId | String | The unique identifier assigned to the registered document. |
| UploadUrl | String | The Amazon S3 endpoint to upload the document file to via an HTTP POST. |
| ContentType | String | The MIME type of the document. |
| UploadKey | String | The S3 object key the file will be stored under. |
| AmzMetaDocumentId | String | S3 object metadata: the registered document unique identifier. |
| AmzMetaSellerId | String | S3 object metadata: the seller identifier. |
| AmzAlgorithm | String | The AWS signing algorithm used for the pre-signed POST. |
| AmzCredential | String | The AWS credential scope used to sign the upload. |
| AmzDate | String | The timestamp the signature was generated, in ISO 8601 basic format. |
| Policy | String | The base64-encoded S3 POST policy. |
| AmzSignature | String | The signature authorizing the upload. |
| AmzSecurityToken | String | The temporary AWS session token for the credentials. |
| Status | String | The status of the operation. |