Skip to content

Create a customer

Request

Creates a customer (vendor) with optional billing address, shipping address, primary contact and account note, without an order. Idempotent on supplier + newVendor.email: a retry after a lost response returns the existing customer's references instead of creating a duplicate.

Accepts user session headers only. Contact support to request API key access for this endpoint.

Security
UserGuid and UserToken and SupplierGuid
Bodyapplication/jsonrequired
newVendorobject(VendorInput)required

Customer fields accepted on create.

newVendorBillToobject(AddressInput)

Address fields accepted when creating or updating an address.

newVendorShipToobject(AddressInput)

Address fields accepted when creating or updating an address.

newVendorContactobject(VendorContactInput)
newVendorNotestring

Free-text account note stored against the new customer.

sourcestring

Origin of the record (for example APP). Stored for reporting only.

curl -i -X POST \
  https://docs.orderwerks.com/_mock/openapi/vendors \
  -H 'Content-Type: application/json' \
  -H 'supplierGuid: YOUR_API_KEY_HERE' \
  -H 'userGuid: YOUR_API_KEY_HERE' \
  -H 'userToken: YOUR_API_KEY_HERE' \
  -d '{
    "newVendor": {
      "name": "Acme, Inc.",
      "email": "orders@acme.example",
      "phone": "555-0100",
      "customer_internal_id": "ACME-001"
    },
    "newVendorBillTo": {
      "name": "Accounts Payable",
      "company_name": "Acme, Inc.",
      "address_line_one": "123 Any Street",
      "city": "Anytown",
      "state": "CA",
      "postal_code": "12345",
      "country": "US"
    },
    "newVendorShipTo": {
      "name": "Receiving",
      "company_name": "Acme, Inc.",
      "address_line_one": "400 Warehouse Road",
      "city": "Anytown",
      "state": "CA",
      "postal_code": "12345",
      "country": "US"
    },
    "newVendorContact": {
      "name": "Jane Doe",
      "email": "jane@acme.example"
    }
  }'

Responses

The created (or matched) customer.

Bodyapplication/json
vendorobject(Vendor)required

A customer of the supplier. The full model includes many integration-specific fields (QuickBooks, Stripe, FastBound, routing); only the commonly used ones are listed here.

billToobject(EntityRef)

Minimal reference to a created record, so a client can back-fill its local rows.

shipToobject(EntityRef)

Minimal reference to a created record, so a client can back-fill its local rows.

contactobject(EntityRef)

Minimal reference to a created record, so a client can back-fill its local rows.

noteobject(EntityRef)

Minimal reference to a created record, so a client can back-fill its local rows.

Response
{ "vendor": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "supplier_id": 0, "parent_vendor_id": 0, "customer_internal_id": "string", "name": "string", "email": "string", "shipping_email": "string", "phone": "string", "cell": "string", "fax": "string", "address_line_one": "string", "address_line_two": "string", "city": "string", "state": "string", "postal_code": "string", "country": "string", "active": true, "tax_exempt": true, "resale_tax_id": "string", "lock_catalog_id": 0, "price_group_id": 0, "payment_type_id": 0, "payment_term_id": 0, "require_payment": true, "credit_limit": 0, "open_balance": 0, "is_ecomm_user": true, "net_term_ecomm_user": true, "require_po": true, "standing_po": "string", "hide_pricing": true, "currency_id": 0, "notes": "string", "default_order_category_id": 0, "route_id": 0, "timezone": "string", "bill_to_id": 0, "ship_to_id": 0, "Bill_To": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "vendor_id": 0, "order_id": 0, "name": "string", "company_name": "string", "address_line_one": "string", "address_line_two": "string", "address_line_three": "string", "city": "string", "state": "string", "postal_code": "string", "country": "string", "phone": "string", "fax": "string", "email": "string", "note": "string", "address_internal_id": "string", "is_vendor_main_ship_to": true, "verified": true, "lat": 0, "lng": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "Ship_To": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "vendor_id": 0, "order_id": 0, "name": "string", "company_name": "string", "address_line_one": "string", "address_line_two": "string", "address_line_three": "string", "city": "string", "state": "string", "postal_code": "string", "country": "string", "phone": "string", "fax": "string", "email": "string", "note": "string", "address_internal_id": "string", "is_vendor_main_ship_to": true, "verified": true, "lat": 0, "lng": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z" }, "billTo": { "id": 4821, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc" }, "shipTo": { "id": 4821, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc" }, "contact": { "id": 4821, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc" }, "note": { "id": 4821, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc" } }