Create Supplier
POST/api/suppliers
Create a new supplier. Automatically creates a default warehouse for the supplier and attaches default pricing tiers.
suppliers:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token. Requires IsPowerUserAccess middleware.
Notes:
- email and purchase_order_email accept comma-separated multiple email addresses
- messaging_phone: the supplier's WhatsApp/SMS number in international format (E.164, e.g. +15551234567), used to message them from a purchase order
- name must be unique
- po_processing_method: email, ftp, direct
- po_batch_schedule.days: monday, tuesday, wednesday, thursday, friday, saturday, sunday
- default_stock_level: normal, low, critical
Requires permission: suppliers.create
Clearing default_incoterm_id (sending it as null/empty) also clears default_incoterm_place — a default named place is never kept without a default term.
Custom fields: custom_field_values (optional array) sets values for supplier custom fields. Each entry takes custom_field_id (required — must reference a custom field defined for suppliers) and value (nullable); id is prohibited on create (value ids only exist once the supplier does). The response echoes each value with its field metadata: name, slug, field_type (text | long_text | number | decimal | date | datetime | checkbox | dropdown), options, description, and is_visible_in_details.
Request
Responses
- 201
- 401
- 403
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.