Skip to main content

Why store_id is required when creating a Purchase Order via the API

Why the SKULabs API needs a store on purchase_order/create, how to find the right store_id, and which store to use in multi-store accounts.

When you create a purchase order through the SKULabs API, you must say which store it belongs to. Without a matching store, the request fails with an error like Store "" not found. Try: ... followed by your store names.

This can be confusing, because the stores returned by store/get look like sales channel connections. This article explains what a store means for a purchase order and which one to use.

What is a store in SKULabs?

A store is the settings scope for a sales channel or storefront in your account, such as a Shopify store, an Amazon account, or a manual store. Each store has its own name, logo, addresses, and document templates.

Why a purchase order needs a store

The store decides how the purchase order looks and is sent:

  • Templates: the PO print and email templates are set per store.

  • Business details: the store's name, logo, and addresses appear on the PO. The store name also fills the STORE placeholder in the PO email subject.

  • Filtering: in accounts with several stores, POs can be listed and exported by store.

How to find the right store_id

  1. Call store/get to list the account's stores.

  2. Pick the store the PO should belong to.

  3. Send that store's ID as store_id in your purchase_order/create request.

The purchase_order/create_v2 and purchase_order/new_create endpoints also accept store_name instead of store_id. The name match ignores upper and lower case.

Which store should I use?

  • One store: use that store.

  • Several stores: use the store whose template, logo, and address should appear on the PO. If you are not sure, use the account's main store.

Summary

A purchase order needs a store because the store holds the PO templates and business details. Pass store_id (or store_name on create_v2) so SKULabs knows which settings to use when it prints or emails the PO.

Did this answer your question?