Skip to main content

Update SPS Commerce Settings

PATCH 

/api/spscommerce/integrations/:id/settings

Update a connection's name, trading-partner IDs, automatic polling, EDI invoicing, inventory advice and carton-level ship notices. Send only the fields you change.

Required scope: integrations:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token and the integrations.update permission.

  • ship_notice_number_partner_ids (array of trading partner IDs, optional): trading partners that route shipments in their own TMS and assign the ship notice number. Their shipments' 856s are held until the number is entered on the shipment, and a "ready for routing" alert is raised when such a shipment is packed or ships without one. Values are trimmed and de-duplicated; an empty array turns this off.
  • inventory_advice_warehouse_ids (array of integers, optional): warehouses whose available stock the daily 846 counts; an empty array counts available-to-sell across every warehouse
  • inventory_advice_buffer (integer, optional, min 0): units held back from every item's 846 quantity
  • asn_structures (object, optional): maps each trading partner ID to its 856 structure — order_item, pick_and_pack, store_order_item (one order level per store) or store_pick_and_pack (Split by store / DC); null or omitted uses the connection default from pack_level_asn. A single shipment can override it with Update Shipment Ship Notice Structure.
  • asn_store_address_types (object, optional): maps each trading partner ID to how a split-by-store 856 names each store — Z7 (mark-for, the default), BY or MA, per the retailer's 856 guide.
  • trading_partner_settings (object, optional): invoicing rules per trading partner ID, merged key by key (send only the partners and keys you change). Each partner accepts: asn_source ("sku" — the 810 for a per-shipment invoice is sent after the shipment's 856; or "external" — an outside 3PL sends the 856, so the 810 is sent as soon as the invoice is issued; default "sku"), invoice_number_format (string up to 40 characters or null for the default format; tokens {order}, {seq}, {seq:3}, {series}, {series:6}, {series:numeric15} — {seq} needs {order}, {series:numeric15} gives digits-only numbers of up to 15 digits and may only be surrounded by digits), freight_invoice ("on_invoice" — freight is a charge on each shipment's 810; or "separate" — freight is billed on its own invoice; default "on_invoice"), supports_credit_memo_810 (boolean; when true, credit notes against this partner's invoices are sent as 810 credit memos; default false), ship_to_address_type ("ST", "BY" or "Z7" — which purchase-order header address becomes the sales order's ship-to name and address; when a purchase order has no address of that type, its ST address is used; default "ST").

The response also lists asn_store_address_type_options, asn_structure_options (every structure with its label) and trading_partner_ids (partners that sent an 850, plus any configured).

Errors: 422 with field keys such as trading_partner_settings.WALMARTDC.invoice_number_format.

warehouse_links lists 3PL warehouses that take warehouse shipping orders (940) through SPS Commerce: warehouse_id, trading_partner_id (the 3PL's SPS trading partner ID), warehouse_code (optional) and sends_cancellations (defaults to true; when false, cancelling a released order is refused until the 3PL has been contacted). A warehouse can be linked once. Sending the list replaces the stored links.

trading_partner_settings.{id}.order_split chooses how a multi-store purchase order with no ship-to becomes sales orders: store (the default, one per store) or distribution_center (one per DC, shipped to the DC, with each store kept on its own lines and cartons).

trading_partner_settings.{id}.document_rules lists the rules a retailer requires; none by default. Any of: carton_detail (every 856 reports cartons, with no zero-quantity lines), after_carrier_pickup (the 856 waits until the carrier pickup is recorded), tms_shipment_id (the ship notice number is required and must be S and 9 digits), bill_of_lading (a freight 856 waits for its own bill of lading), one_ship_notice_per_ups_carton (a UPS shipment goes out as one 856 per carton), padded_location_codes (location numbers go out as 4 digits with leading zeros), invoice_destination_in_ship_to_and_buyer (one 810 per shipment, naming the destination in both ST and BY). Removing a rule that was holding ship notices sends them.

trading_partner_settings.{id}.shipment_flow chooses how a retailer's orders reach the warehouse: asn_856 (the default) warehouse_940_945 (an order released to a linked warehouse goes out as a 940, and its shipment is recorded when the 945 comes back), or warehouse_receive_only (the 3PL gets its orders outside SKU.io: nothing is sent to it, no 855, 846 or 856 is sent, its shipment confirmation is matched by PO number, and the 810 follows the recorded shipment). On warehouse_940_945 with asn_source external, the 3PL sends the retailer's 856 and SKU.io does not. On warehouse_receive_only the 3PL always sends it, whatever asn_source says. Set this before a retailer's first purchase order: any trading partner ID can be added here. Once any partner on the connection is on warehouse_receive_only, a partner with no flow returns shipment_flow null, its purchase orders are held with an alert and nothing is sent to it until a flow is set. Sending null sets nothing. flow_chosen in the response says whether a partner's flow was set or is only the default.

  • trading_partner_settings.{partner}.warehouse_flows (object, optional): the warehouses that differ from the partner's shipment_flow, keyed by warehouse ID, each asn_856, warehouse_940_945 or warehouse_receive_only. Use it for a retailer split across 3PLs.
  • warehouse_links[].sends_order_updates (boolean, default false): when true, an order edited after its 940 went out sends the 3PL an updated 940 automatically. When false, an alert is raised and the update is sent with Send EDI Document Update.
  • warehouse_links[].cancels_short_ships (boolean, default false): when true, a 945 that says the order is finished but shipped less than ordered cancels the unshipped balance on the sales order. When false, an alert is raised.
  • document_format (string, optional): "xml" (RSX XML, the default) or "json" (RSX JSON) — the format this connection's documents are sent to SPS Commerce in. Use json when SPS has set your connection up for JSON over the Transaction API. Incoming documents are read in either format whatever this is set to. The response includes document_format and document_format_options.

Polling and which documents are sent (855, 856, 810, 846) are not settings here: they are the connection's sync controls, read and changed with the Integration Instances sync-controls endpoints (PATCH /api/integration-instances/{integration_instance}/sync-controls, POST .../pause, POST .../resume).

Request​

Responses​

OK

Response Headers
    Content-Type