SPS Commerce

App · 20 actions

Trade EDI documents with your retailers through SPS Commerce: read new purchase orders, send acknowledgements, ship notices and invoices, and make retailer-compliant shipping labels and packing slips.

Actions

ActionWhat it does
Delete fileDelete a file from your SPS Commerce file space, such as an order your system has finished processing, so it isn't read again.
Get fileRead one file from your SPS Commerce file space, such as a purchase order, as text, and as data when it is JSON.
Get label batchCheck a label batch: In Progress, Completed or Failed, with what was wrong with the data.
Get packing slip sample dataGet sample data for a retailer's packing slip, a starting point for the data you render it with.
Get packing slip schemaGet the JSON schema of the data a retailer's packing slip needs, to check what to send before rendering.
Get packing slip templateGet one retailer packing slip template with its owner, versions and whether you may print it.
Get shipping label sample dataGet sample data for a retailer's shipping label, a starting point for the data you render it with.
Get shipping label schemaGet the JSON schema of the data a retailer's shipping label needs, to check what to send before rendering.
Get shipping label templateGet one retailer shipping label template with its owner, versions and whether you may print it.
List file historyList SPS Commerce's processing reports for the files you sent and received, with each file's status log (uploaded, downloaded, deleted).
List filesList the files and folders in one folder of your SPS Commerce file space, such as new purchase orders in out/PO/.
List packing slip templatesList the retailer packing slip templates you can use, and whether you may print each or only preview it.
List shipping label templatesList the retailer shipping label templates (GS1-128 and UCC-128 carton labels) you can use, and whether you may print each or only preview it.
Make packing slip PDFMake a retailer-compliant packing slip as a PDF from your shipment's data.
Make sample packing slip PDFMake a sample PDF of a retailer's packing slip, filled with SPS's sample data, to see what it looks like.
Make sample shipping label PDFMake a sample PDF of a retailer's shipping label, filled with SPS's sample data, to see what it looks like.
Make shipping label PDFMake retailer-compliant shipping labels as a PDF from your shipment's data, up to 200 packs at a time.
Make shipping label ZPLMake retailer-compliant shipping labels as ZPL, the language Zebra label printers take, from your shipment's data.
Send documentSend a document, such as an order acknowledgement, ship notice or invoice in RSX XML or JSON, to SPS Commerce for your trading partners.
Start label batchStart making a large set of shipping labels (more than 200 packs) as a PDF or ZPL in the background.

Delete file

Delete a file from your SPS Commerce file space, such as an order your system has finished processing, so it isn't read again.

Inputs

File pathpathtextRequired
The file's full path, such as /out/PO/PO123456.xml, from 'List files' or a trigger. Paths are case sensitive.

Outputs

deletedtrue/false
True once SPS has deleted it
pathtext
The deleted file's path
Example output
{
  "deleted": true,
  "path": "/out/PO/PO584615-1-v7.7-BulkImport.xml"
}

Get file

Read one file from your SPS Commerce file space, such as a purchase order, as text, and as data when it is JSON. It can also be saved as a file for a later step.

Inputs

File pathpathtextRequired
The file's full path, such as /out/PO/PO123456.xml, from 'List files' or a trigger. Paths are case sensitive.
Save as a filesave_as_filetrue/false
Turn on to also save it as a file a later step can attach.

Outputs

contenttext
The file's text, or empty if it isn't text
content_typetext
The type SPS gave the file
dataobject
The file read as JSON, when it is JSON; otherwise empty
documentslist
The saved files, to attach in a later step
formattext
json, xml, edi, text or binary
nametext
The file's name
pathtext
The file's path
size_bytesnumber
The file's size in bytes
Example output
{
  "content": "{\"Header\": {\"OrderHeader\": {\"PurchaseOrderNumber\": \"584615\"}}}",
  "content_type": "application/octet-stream",
  "data": {
    "Header": {
      "OrderHeader": {
        "PurchaseOrderNumber": "584615"
      }
    }
  },
  "documents": [],
  "format": "json",
  "name": "PO584615-1-v7.7-BulkImport.json",
  "path": "/out/PO/PO584615-1-v7.7-BulkImport.json",
  "size_bytes": 62
}

Get label batch

Check a label batch: In Progress, Completed or Failed, with what was wrong with the data. Once it has completed, its PDF or ZPL is saved as a file.

Inputs

Batch IDbatch_idtextRequired
The batch's id, from 'Start label batch'.
Save the resultsave_resulttrue/false
On by default: once it has completed, save its labels as a file. Turn off to get only the link.

Outputs

batch_idtext
The batch's id
completedtrue/false
True once the labels are ready
documentslist
The saved files, to attach in a later step
failedtrue/false
True if the batch failed
failure_descriptiontext
Why it failed, if it did
response_typetext
The kind of result, PDF or ZPL
result_urltext
A short-lived link to the result, once completed
statustext
In Progress, Completed or Failed
validation_errorslist
What was wrong with the data, if anything
Example output
{
  "batch_id": "8785d17f-b65e-44fb-a904-be962de8f123",
  "completed": true,
  "documents": [
    {
      "content_type": "application/pdf",
      "document_ref": "doc_0123456789abcdef",
      "filename": "sps-label-batch.pdf",
      "size_bytes": 48211,
      "url": "/actions/core/serve-document/doc_0123456789abcdef?teamId=64b0000000000000000000aa"
    }
  ],
  "failed": false,
  "failure_description": "",
  "response_type": "PDF",
  "result_url": "https://cdn.spscommerce.com/0d14a7f6.pdf",
  "status": "Completed",
  "validation_errors": []
}

Get packing slip sample data

Get sample data for a retailer's packing slip, a starting point for the data you render it with.

Inputs

Packing slip templatepacking_slip_idtextRequired
The retailer's packing slip template, from 'List packing slip templates'.

Outputs

packing_slip_idtext
The template's id
sampleobject
Sample data, with the Header and Pack the slip reads
Example output
{
  "packing_slip_id": "1ff23456",
  "sample": {
    "Header": {
      "Address": [
        {
          "Address1": "123 Main Street",
          "AddressName": "William Bill To",
          "AddressTypeCode": "SF",
          "City": "Minneapolis",
          "Country": "USA",
          "PostalCode": "55402",
          "State": "MN"
        }
      ],
      "BillOfLadingNumber": "BOL-Number"
    },
    "Pack": [
      {
        "Item": [
          {
            "UPCCaseCode": "676123123123"
          }
        ],
        "ShippingSerialID": "00001234560014762261"
      }
    ]
  }
}

Get packing slip schema

Get the JSON schema of the data a retailer's packing slip needs, to check what to send before rendering.

Inputs

Packing slip templatepacking_slip_idtextRequired
The retailer's packing slip template, from 'List packing slip templates'.
Use upcoming requirementspending_changetrue/false
Turn on to use the retailer's upcoming packing slip requirements instead of the current ones.

Outputs

packing_slip_idtext
The template's id
schemaobject
The JSON schema (draft 7) of the packing slip's data
Example output
{
  "packing_slip_id": "1ff23456",
  "schema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "properties": {
      "Header": {
        "type": "object"
      },
      "Pack": {
        "type": "array"
      }
    },
    "type": "object"
  }
}

Get packing slip template

Get one retailer packing slip template with its owner, versions and whether you may print it.

Inputs

Packing slip templatepacking_slip_idtextRequired
The retailer's packing slip template, from 'List packing slip templates'.

Outputs

packing_slipobject
A retailer's template
Example output
{
  "packing_slip": {
    "aliases": [
      {
        "alias": "",
        "version": "1.00"
      }
    ],
    "canRender": true,
    "createdAt": "Wed, 19 Sep 2018 19:31:35 GMT",
    "description": "Packing Slip details",
    "format": "xsl",
    "id": "1ff23456",
    "name": "SPS Commerce Packing Slip - 1",
    "outputFormat": "",
    "ownerID": "123451927301720471274",
    "ownerName": "SPS Commerce",
    "type": "packing-slip",
    "versions": [
      {
        "createdAt": "2018-09-19 19:31:35.156163",
        "tags": [],
        "version": "1.00",
        "versionNotes": "Initial Version"
      }
    ]
  }
}

Get shipping label sample data

Get sample data for a retailer's shipping label, a starting point for the data you render it with.

Inputs

Shipping label templatelabel_idtextRequired
The retailer's label template, from 'List shipping label templates'.

Outputs

label_idtext
The template's id
sampleobject
Sample data, with the Header and Pack the label reads
Example output
{
  "label_id": "1234567",
  "sample": {
    "Header": {
      "Address": [
        {
          "Address1": "123 Main Street",
          "AddressName": "William Bill To",
          "AddressTypeCode": "SF",
          "City": "Minneapolis",
          "Country": "USA",
          "PostalCode": "55402",
          "State": "MN"
        }
      ],
      "BillOfLadingNumber": "BOL-Number"
    },
    "Pack": [
      {
        "Item": [
          {
            "UPCCaseCode": "676123123123"
          }
        ],
        "ShippingSerialID": "00001234560014762261"
      }
    ]
  }
}

Get shipping label schema

Get the JSON schema of the data a retailer's shipping label needs, to check what to send before rendering.

Inputs

Shipping label templatelabel_idtextRequired
The retailer's label template, from 'List shipping label templates'.
Use upcoming requirementspending_changetrue/false
Turn on to use the retailer's upcoming label requirements instead of the current ones.

Outputs

label_idtext
The template's id
schemaobject
The JSON schema (draft 7) of the label's data
Example output
{
  "label_id": "1234567",
  "schema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "properties": {
      "Header": {
        "type": "object"
      },
      "Pack": {
        "type": "array"
      }
    },
    "type": "object"
  }
}

Get shipping label template

Get one retailer shipping label template with its owner, versions and whether you may print it.

Inputs

Shipping label templatelabel_idtextRequired
The retailer's label template, from 'List shipping label templates'.

Outputs

labelobject
A retailer's template
Example output
{
  "label": {
    "aliases": [
      {
        "alias": "",
        "version": "1.00"
      }
    ],
    "canRender": true,
    "createdAt": "Wed, 19 Sep 2018 19:31:35 GMT",
    "description": "Shipping Label details",
    "format": "xsl",
    "id": "1234567",
    "name": "SPS Commerce Shipping Label - 1",
    "outputFormat": "",
    "ownerID": "123451927301720471274",
    "ownerName": "SPS Commerce",
    "type": "label",
    "versions": [
      {
        "createdAt": "2018-09-19 19:31:35.156163",
        "tags": [],
        "version": "1.00",
        "versionNotes": "Initial Version"
      }
    ]
  }
}

List file history

List SPS Commerce's processing reports for the files you sent and received, with each file's status log (uploaded, downloaded, deleted). Reports can take 5 minutes to appear.

Inputs

Fromafterdate and time
Only reports from this time on.
Untiluntildate and time
Only reports up to this time.
Limitlimitnumber
How many reports to return. SPS's default is 100.From 1 to 1000.
Skipoffsetnumber
How many reports to skip. Use the next_offset an earlier run gave to read on.At least 0.

Outputs

countnumber
How many reports this page holds
next_offsetnumber
The offset for the next page, or 0 at the end
reportslist
The processing reports
total_countnumber
How many reports match in all
Example output
{
  "count": 1,
  "next_offset": 0,
  "reports": [
    {
      "direction": "out",
      "id": "3f319141-a227-4fac-81f1-ace6f968560d",
      "latest_message": "Deleted by the client.",
      "latest_status": "deleted",
      "latest_status_at": "2026-05-05T19:46:31.259Z",
      "path": "out/CA584615-1-v7.7-BulkImport.xml",
      "status_log": [
        {
          "message": "",
          "status": "uploaded",
          "timestamp": "2026-05-05T19:44:48.626Z"
        },
        {
          "message": "Deleted by the client.",
          "status": "deleted",
          "timestamp": "2026-05-05T19:46:31.259Z"
        }
      ]
    }
  ],
  "total_count": 1
}

List files

List the files and folders in one folder of your SPS Commerce file space, such as new purchase orders in out/PO/. Gets up to 1,000 at a time; to see more, run it again with the cursor it gives.

Inputs

FolderfoldertextRequired
The folder to list. Documents from trading partners arrive in out (production) and testout (test).
Document typedocument_typetext
Only files of this type, by the code their names start with.One of: PO (Purchase orders (PO)), PC (Purchase order changes (PC)), PR (Purchase order acknowledgements (PR)), CA (Order change acknowledgements (CA)), SH (Shipments and advance ship notices (SH)), IN (Invoices (IN)), IB (Inventory and item registries (IB)), PS (Planning schedules (PS)), PD (Product activity (PD)), OW (Warehouse shipping orders (OW)), and 3 more.
Name starts withname_prefixtext
Only files and folders whose names start with this (case sensitive).
Limitlimitnumber
How many to return, 1 to 1,000. Defaults to 1,000.From 1 to 1000.
Cursorcursortext
The next_cursor an earlier run gave, to read on.

Outputs

countnumber
How many entries this page holds
entrieslist
The files and folders in it
file_countnumber
How many of them are files
foldertext
The folder listed
next_cursortext
The cursor for the next page, or empty at the end
Example output
{
  "count": 2,
  "entries": [
    {
      "name": "PO",
      "path": "/out/PO/",
      "type": "directory",
      "url": "https://api.spscommerce.com/transactions/v5/data/out/PO/"
    },
    {
      "name": "PO584615-1-v7.7-BulkImport.xml",
      "path": "/out/PO/PO584615-1-v7.7-BulkImport.xml",
      "type": "file",
      "url": "https://api.spscommerce.com/transactions/v5/data/out/PO/PO584615-1-v7.7-BulkImport.xml"
    }
  ],
  "file_count": 1,
  "folder": "/out/",
  "next_cursor": ""
}

List packing slip templates

List the retailer packing slip templates you can use, and whether you may print each or only preview it.

Inputs

Template namenametext
Only templates whose name contains this, such as a retailer's name.
Ownerowner_nametext
Only templates whose owner's name contains this.
Match names exactlyexact_matchtrue/false
Turn on to match the template name and owner exactly rather than by part.
Newest firstnewesttrue/false
Turn on to list the newest templates first.
Limitlimitnumber
How many templates to return, up to 1,000.From 1 to 1000.
Skipoffsetnumber
How many templates to skip, to read on past an earlier page.At least 0.

Outputs

countnumber
How many were returned
packing_slipslist
The packing slip templates
Example output
{
  "count": 1,
  "packing_slips": [
    {
      "canRender": true,
      "description": "Packing Slip details",
      "id": "1ff23456",
      "name": "SPS Commerce Packing Slip - 1",
      "ownerID": "123451927301720471274",
      "ownerName": "SPS Commerce",
      "type": "packing-slip"
    }
  ]
}

List shipping label templates

List the retailer shipping label templates (GS1-128 and UCC-128 carton labels) you can use, and whether you may print each or only preview it.

Inputs

Template namenametext
Only templates whose name contains this, such as a retailer's name.
Ownerowner_nametext
Only templates whose owner's name contains this.
Match names exactlyexact_matchtrue/false
Turn on to match the template name and owner exactly rather than by part.
Printablecan_rendertext
Only templates you can print, or only those you can just preview.One of: true (Ones you can print), false (Ones you can only preview).
Newest firstnewesttrue/false
Turn on to list the newest templates first.
Limitlimitnumber
How many templates to return, up to 1,000.From 1 to 1000.
Skipoffsetnumber
How many templates to skip, to read on past an earlier page.At least 0.

Outputs

countnumber
How many were returned
labelslist
The label templates
Example output
{
  "count": 1,
  "labels": [
    {
      "canRender": true,
      "description": "Shipping Label details",
      "id": "1234567",
      "name": "SPS Commerce Shipping Label - 1",
      "ownerID": "123451927301720471274",
      "ownerName": "SPS Commerce",
      "type": "label"
    }
  ]
}

Make packing slip PDF

Make a retailer-compliant packing slip as a PDF from your shipment's data. Saved as a file to print or attach.

Inputs

Packing slip templatepacking_slip_idtextRequired
The retailer's packing slip template, from 'List packing slip templates'.
DatadataobjectRequired
The packing slip's data as JSON: a Header and Pack objects in SPS's layout. 'Get packing slip sample data' gives an example, and 'Get file' can read it from an order.
Use upcoming requirementspending_changetrue/false
Turn on to use the retailer's upcoming packing slip requirements instead of the current ones.

Outputs

content_typetext
The saved file's type, such as application/pdf
document_reftext
The saved file's reference, to attach it in a later step
documentslist
The saved files, to attach in a later step
filenametext
The saved file's name
packing_slip_idtext
The packing slip template's id
size_bytesnumber
The saved file's size in bytes
urltext
Where to open the saved file in Lodol
Example output
{
  "content_type": "application/pdf",
  "document_ref": "doc_0123456789abcdef",
  "documents": [
    {
      "content_type": "application/pdf",
      "document_ref": "doc_0123456789abcdef",
      "filename": "sps-packing-slip-1ff23456.pdf",
      "size_bytes": 48211,
      "url": "/actions/core/serve-document/doc_0123456789abcdef?teamId=64b0000000000000000000aa"
    }
  ],
  "filename": "sps-packing-slip-1ff23456.pdf",
  "packing_slip_id": "1ff23456",
  "size_bytes": 48211,
  "url": "/actions/core/serve-document/doc_0123456789abcdef?teamId=64b0000000000000000000aa"
}

Make sample packing slip PDF

Make a sample PDF of a retailer's packing slip, filled with SPS's sample data, to see what it looks like. Saved as a file.

Inputs

Packing slip templatepacking_slip_idtextRequired
The retailer's packing slip template, from 'List packing slip templates'.
Use upcoming requirementspending_changetrue/false
Turn on to use the retailer's upcoming packing slip requirements instead of the current ones.

Outputs

content_typetext
The saved file's type, such as application/pdf
document_reftext
The saved file's reference, to attach it in a later step
documentslist
The saved files, to attach in a later step
filenametext
The saved file's name
packing_slip_idtext
The packing slip template's id
size_bytesnumber
The saved file's size in bytes
urltext
Where to open the saved file in Lodol
Example output
{
  "content_type": "application/pdf",
  "document_ref": "doc_0123456789abcdef",
  "documents": [
    {
      "content_type": "application/pdf",
      "document_ref": "doc_0123456789abcdef",
      "filename": "sps-packing-slip-1ff23456-sample.pdf",
      "size_bytes": 48211,
      "url": "/actions/core/serve-document/doc_0123456789abcdef?teamId=64b0000000000000000000aa"
    }
  ],
  "filename": "sps-packing-slip-1ff23456-sample.pdf",
  "packing_slip_id": "1ff23456",
  "size_bytes": 48211,
  "url": "/actions/core/serve-document/doc_0123456789abcdef?teamId=64b0000000000000000000aa"
}

Make sample shipping label PDF

Make a sample PDF of a retailer's shipping label, filled with SPS's sample data, to see what it looks like. Saved as a file.

Inputs

Shipping label templatelabel_idtextRequired
The retailer's label template, from 'List shipping label templates'.
Labels per pagelabels_per_pagetext
One label a page, or four. SPS's default is one.One of: 1 (One label a page), 4 (Four labels a page).
Use upcoming requirementspending_changetrue/false
Turn on to use the retailer's upcoming label requirements instead of the current ones.

Outputs

content_typetext
The saved file's type, such as application/pdf
document_reftext
The saved file's reference, to attach it in a later step
documentslist
The saved files, to attach in a later step
filenametext
The saved file's name
label_idtext
The label template's id
size_bytesnumber
The saved file's size in bytes
urltext
Where to open the saved file in Lodol
Example output
{
  "content_type": "application/pdf",
  "document_ref": "doc_0123456789abcdef",
  "documents": [
    {
      "content_type": "application/pdf",
      "document_ref": "doc_0123456789abcdef",
      "filename": "sps-label-1234567-sample.pdf",
      "size_bytes": 48211,
      "url": "/actions/core/serve-document/doc_0123456789abcdef?teamId=64b0000000000000000000aa"
    }
  ],
  "filename": "sps-label-1234567-sample.pdf",
  "label_id": "1234567",
  "size_bytes": 48211,
  "url": "/actions/core/serve-document/doc_0123456789abcdef?teamId=64b0000000000000000000aa"
}

Make shipping label PDF

Make retailer-compliant shipping labels as a PDF from your shipment's data, up to 200 packs at a time. Saved as a file to print or attach.

Inputs

Shipping label templatelabel_idtextRequired
The retailer's label template, from 'List shipping label templates'.
DatadataobjectRequired
The label's data as JSON: a Header and Pack objects in SPS's layout. 'Get shipping label sample data' gives an example, and 'Get file' can read it from an order.
Labels per pagelabels_per_pagetext
One label a page, or four. SPS's default is one.One of: 1 (One label a page), 4 (Four labels a page).
Use upcoming requirementspending_changetrue/false
Turn on to use the retailer's upcoming label requirements instead of the current ones.
First pack numberstart_pack_countnumber
The pack number on the first label, so labels read 'Pack 5 of 20'. Defaults to 1.At least 1.
Total packstotal_pack_countnumber
The total number of packs in the shipment, if more than this data holds.At least 1.
Copiescopiesnumber
How many copies of each label, 1 to 100. Defaults to 1.From 1 to 100.
Collate copiescollatetrue/false
Turn on to print copies as A B C, A B C rather than A A, B B, C C.
Pagespagestext
Only these pages, as numbers separated by commas, such as 2, 5. Leave empty for all.

Outputs

content_typetext
The saved file's type, such as application/pdf
document_reftext
The saved file's reference, to attach it in a later step
documentslist
The saved files, to attach in a later step
filenametext
The saved file's name
label_idtext
The label template's id
size_bytesnumber
The saved file's size in bytes
urltext
Where to open the saved file in Lodol
Example output
{
  "content_type": "application/pdf",
  "document_ref": "doc_0123456789abcdef",
  "documents": [
    {
      "content_type": "application/pdf",
      "document_ref": "doc_0123456789abcdef",
      "filename": "sps-label-1234567.pdf",
      "size_bytes": 48211,
      "url": "/actions/core/serve-document/doc_0123456789abcdef?teamId=64b0000000000000000000aa"
    }
  ],
  "filename": "sps-label-1234567.pdf",
  "label_id": "1234567",
  "size_bytes": 48211,
  "url": "/actions/core/serve-document/doc_0123456789abcdef?teamId=64b0000000000000000000aa"
}

Make shipping label ZPL

Make retailer-compliant shipping labels as ZPL, the language Zebra label printers take, from your shipment's data. Returns one ZPL text per label.

Inputs

Shipping label templatelabel_idtextRequired
The retailer's label template, from 'List shipping label templates'.
DatadataobjectRequired
The label's data as JSON: a Header and Pack objects in SPS's layout. 'Get shipping label sample data' gives an example, and 'Get file' can read it from an order.
Labels per pagelabels_per_pagetext
One label a page, or four. SPS's default is one.One of: 1 (One label a page), 4 (Four labels a page).
Media typemedia_typetext
The kind of labels in the printer. SPS's default is thermal transfer.One of: T (Thermal transfer), D (Direct thermal).
Print modeprint_modetext
What the printer does after each label. SPS's default is tear off.One of: T (Tear off), P (Peel off), R (Rewind), A (Applicator), C (Cutter), D (Delayed cutter), F (RFID), K (Kiosk).
Print resolutiondpitext
The printer's resolution. SPS's default is 203 dpi; 600 needs the Compressed command.One of: 152 (152 dpi), 203 (203 dpi), 300 (300 dpi), 600 (600 dpi (Compressed only)).
ZPL commandzpl_commandtext
How images are drawn. Pick one your printer supports; SPS's default is Standard.One of: DG (Standard (DG)), DY (Compressed, smaller files (DY)), GFA (Fast printing (GFA)).
Use upcoming requirementspending_changetrue/false
Turn on to use the retailer's upcoming label requirements instead of the current ones.
First pack numberstart_pack_countnumber
The pack number on the first label, so labels read 'Pack 5 of 20'. Defaults to 1.At least 1.
Total packstotal_pack_countnumber
The total number of packs in the shipment, if more than this data holds.At least 1.
Copiescopiesnumber
How many copies of each label, 1 to 100. Defaults to 1.From 1 to 100.
Collate copiescollatetrue/false
Turn on to print copies as A B C, A B C rather than A A, B B, C C.
Pagespagestext
Only these pages, as numbers separated by commas, such as 2, 5. Leave empty for all.

Outputs

countnumber
How many labels
label_idtext
The template's id
zpltext
All the labels' ZPL, one after another, to send to a printer
zpl_datalist
The ZPL for each label
Example output
{
  "count": 1,
  "label_id": "1234567",
  "zpl": "^XA^FO50,50^A0N,50,50^FDPack 1 of 1^FS^XZ",
  "zpl_data": [
    "^XA^FO50,50^A0N,50,50^FDPack 1 of 1^FS^XZ"
  ]
}

Send document

Send a document, such as an order acknowledgement, ship notice or invoice in RSX XML or JSON, to SPS Commerce for your trading partners. A file with the same name is replaced.

Inputs

Send tofoldertextRequired
Test sends it through your test connections; Production sends it to your trading partners.One of: testin/ (Test (testin)), in/ (Production (in)).
DocumentcontenttextRequired
The document's content, such as RSX XML or JSON.
Document typedocument_typetext
What the document is. Used to name the file when File name is empty.One of: PO (Purchase orders (PO)), PC (Purchase order changes (PC)), PR (Purchase order acknowledgements (PR)), CA (Order change acknowledgements (CA)), SH (Shipments and advance ship notices (SH)), IN (Invoices (IN)), IB (Inventory and item registries (IB)), PS (Planning schedules (PS)), PD (Product activity (PD)), OW (Warehouse shipping orders (OW)), and 3 more.
File namefile_nametext
The file's name, starting with its document type code, such as IN123456.xml. Leave empty to have one made.
Metadatametadataobject
Names and values stored with the file, if your setup uses them.

Outputs

nametext
The file's name
pathtext
The file's path in SPS Commerce
size_bytesnumber
How many bytes were sent
urltext
The file's address in the Transaction API
Example output
{
  "name": "IN9f2c4b7e1a3d4c5b8e6f7a8b9c0d1e2f.xml",
  "path": "/testin/IN9f2c4b7e1a3d4c5b8e6f7a8b9c0d1e2f.xml",
  "size_bytes": 1450,
  "url": "https://api.spscommerce.com/transactions/v5/data/testin/IN9f2c4b7e1a3d4c5b8e6f7a8b9c0d1e2f.xml"
}

Start label batch

Start making a large set of shipping labels (more than 200 packs) as a PDF or ZPL in the background. Check on it with 'Get label batch'.

Inputs

Shipping label templatelabel_idtextRequired
The retailer's label template, from 'List shipping label templates'.
DatadataobjectRequired
The label's data as JSON: a Header and Pack objects in SPS's layout. 'Get shipping label sample data' gives an example, and 'Get file' can read it from an order.
Formatoutput_formattext
PDF, or ZPL for label printers. Defaults to PDF.One of: pdf, zpl (ZPL for label printers). Default: pdf.
Labels per pagelabels_per_pagetext
One label a page, or four. SPS's default is one.One of: 1 (One label a page), 4 (Four labels a page).
Media typemedia_typetext
The kind of labels in the printer. SPS's default is thermal transfer.Only when Format is ZPL for label printers. One of: T (Thermal transfer), D (Direct thermal).
Print modeprint_modetext
What the printer does after each label. SPS's default is tear off.Only when Format is ZPL for label printers. One of: T (Tear off), P (Peel off), R (Rewind), A (Applicator), C (Cutter), D (Delayed cutter), F (RFID), K (Kiosk).
Print resolutiondpitext
The printer's resolution. SPS's default is 203 dpi; 600 needs the Compressed command.Only when Format is ZPL for label printers. One of: 152 (152 dpi), 203 (203 dpi), 300 (300 dpi), 600 (600 dpi (Compressed only)).
ZPL commandzpl_commandtext
How images are drawn. Pick one your printer supports; SPS's default is Standard.Only when Format is ZPL for label printers. One of: DG (Standard (DG)), DY (Compressed, smaller files (DY)), GFA (Fast printing (GFA)).
Use upcoming requirementspending_changetrue/false
Turn on to use the retailer's upcoming label requirements instead of the current ones.
First pack numberstart_pack_countnumber
The pack number on the first label, so labels read 'Pack 5 of 20'. Defaults to 1.At least 1.
Total packstotal_pack_countnumber
The total number of packs in the shipment, if more than this data holds.At least 1.
Copiescopiesnumber
How many copies of each label, 1 to 100. Defaults to 1.From 1 to 100.
Collate copiescollatetrue/false
Turn on to print copies as A B C, A B C rather than A A, B B, C C.
Pagespagestext
Only these pages, as numbers separated by commas, such as 2, 5. Leave empty for all.
Check the data in the backgroundvalidate_latertrue/false
On by default: SPS checks the data while it works and reports problems in 'Get label batch'. Turn off to have it checked before the batch starts.

Outputs

batch_idtext
The batch's id, for 'Get label batch'
label_idtext
The template's id
output_formattext
pdf or zpl
status_urltext
The batch's status address
Example output
{
  "batch_id": "8785d17f-b65e-44fb-a904-be962de8f123",
  "label_id": "1234567",
  "output_format": "pdf",
  "status_url": "https://api.spscommerce.com/label/v1/batches/8785d17f-b65e-44fb-a904-be962de8f123"
}

On this page