> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gomarketbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a supplier

> Location fields are canonicalised to ISO codes: `country` is an ISO 3166-1 alpha-2 code (e.g. "CA"), `state` an ISO 3166-2 subdivision of that country ("CA-ON" or "ON"). Invalid codes return 400. `city` is free text.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/projects/{projectId}/suppliers
openapi: 3.0.0
info:
  title: MarketBox 2.0 Open API
  version: 1.0.0
  description: >-
    The MarketBox public API for building booking experiences. Core model:
    create an order, then draw its order items down into bookings. Single
    bookings reference an order item per service line; package bookings draw one
    PACKAGE item down across N sessions. To schedule a package, build a slate
    (POST /availability/package-slate) and book it by slateId (POST
    /orders/{orderId}/package-bookings). See the guides for end-to-end
    walkthroughs.
  contact:
    name: MarketBox support
servers:
  - url: https://apiv2.gomarketbox.com
    description: MarketBox Open API
security:
  - ApiKeyAuth: []
paths:
  /v1/projects/{projectId}/suppliers:
    post:
      tags:
        - Suppliers
      summary: Create a supplier
      description: >-
        Location fields are canonicalised to ISO codes: `country` is an ISO
        3166-1 alpha-2 code (e.g. "CA"), `state` an ISO 3166-2 subdivision of
        that country ("CA-ON" or "ON"). Invalid codes return 400. `city` is free
        text.
      parameters:
        - schema:
            type: string
            minLength: 1
            description: >-
              The project (tenant) that owns the resource. Every resource in
              this API is scoped to a project, and your API key is restricted to
              the projects it was issued for — a project outside that scope
              returns 403.
            example: prj_01kv60qgnef2kt3pvqgwmkbzfr
          required: true
          description: >-
            The project (tenant) that owns the resource. Every resource in this
            API is scoped to a project, and your API key is restricted to the
            projects it was issued for — a project outside that scope returns
            403.
          name: projectId
          in: path
      requestBody:
        description: Supplier data
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                firstName:
                  type: string
                  minLength: 1
                lastName:
                  type: string
                  minLength: 1
                email:
                  type: string
                  format: email
                phone:
                  type: string
                  nullable: true
                  description: >-
                    Phone number. Accepts E.164 or a national NANP number;
                    stored as E.164 (e.g. +14165550134).
                addressoneline:
                  type: string
                street:
                  type: string
                city:
                  type: string
                state:
                  type: string
                country:
                  type: string
                postalcode:
                  type: string
                longitude:
                  type: number
                latitude:
                  type: number
                timezone:
                  type: string
                  description: >-
                    IANA timezone the supplier works in. Drives when their daily
                    agenda email fires: it is used verbatim as the EventBridge
                    schedule timezone, so a value the scheduler rejects means no
                    agenda email at all. Unset inherits the project’s
                    defaultTimezone.
                  example: America/Toronto
                bio:
                  type: string
                maxTravelTime:
                  type: integer
                  minimum: 0
                externalId:
                  type: string
                externalData:
                  type: object
                  additionalProperties:
                    nullable: true
                active:
                  type: boolean
                  default: true
                serviceIds:
                  type: array
                  items:
                    type: string
                  default: []
                skillIds:
                  type: array
                  items:
                    type: string
                  default: []
                languages:
                  type: array
                  items:
                    type: string
                    enum:
                      - en
                      - fr
                      - es
                      - de
                      - it
                      - pt
                      - nl
                      - zh
                      - ja
                      - ko
                      - ar
                      - hi
                      - ru
                      - pl
                      - tr
                      - vi
                  default: []
                defaultLocale:
                  type: string
                  description: >-
                    The supplier's own preferred locale (BCP-47, e.g. 'fr-CA').
                    Staff-set only — never inferred from a booking. Omit to
                    inherit the project default.
                  example: fr-CA
              required:
                - firstName
                - lastName
                - email
      responses:
        '201':
          description: Supplier created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      supplierId:
                        type: string
                      firstName:
                        type: string
                      lastName:
                        type: string
                      email:
                        type: string
                      phone:
                        type: string
                      addressoneline:
                        type: string
                      longitude:
                        type: number
                      latitude:
                        type: number
                      city:
                        type: string
                      state:
                        type: string
                      country:
                        type: string
                      postalcode:
                        type: string
                      bio:
                        type: string
                      maxTravelTime:
                        type: number
                      externalId:
                        type: string
                      externalData:
                        type: object
                        additionalProperties:
                          nullable: true
                      active:
                        type: boolean
                      updatedAt:
                        type: string
                      timezone:
                        type: string
                        description: >-
                          The supplier's own IANA timezone. Absent when none is
                          set on the profile, in which case fall back to the
                          project's default timezone rather than the caller's.
                          Every `*Local` time this API renders for this supplier
                          is in this zone.
                        example: America/Toronto
                      avatarUrl:
                        type: string
                        nullable: true
                        format: uri
                      services:
                        type: array
                        items:
                          type: object
                          properties:
                            serviceId:
                              type: string
                            name:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - serviceId
                            - name
                      skills:
                        type: array
                        items:
                          type: object
                          properties:
                            skillId:
                              type: string
                            name:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - skillId
                            - name
                      locations:
                        type: array
                        items:
                          type: object
                          properties:
                            locationId:
                              type: string
                            locationType:
                              type: string
                              enum:
                                - PHYSICAL
                                - VIRTUAL
                                - TRAVEL_ZONE
                            name:
                              type: string
                            country:
                              type: string
                              nullable: true
                            state:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            addressOneLine:
                              type: string
                              nullable: true
                            street:
                              type: string
                              nullable: true
                            latitude:
                              type: number
                              nullable: true
                            longitude:
                              type: number
                              nullable: true
                            travelZoneType:
                              type: string
                              nullable: true
                              enum:
                                - CIRCULAR
                                - DRAWN
                                - null
                          required:
                            - locationId
                            - locationType
                            - name
                      servedRegions:
                        type: array
                        items:
                          type: string
                        description: >-
                          The region paths this supplier is indexed under — the
                          SAME set the `country`/`state`/`city` filter on `GET
                          /suppliers` matches against, so a supplier is returned
                          by that filter exactly when the query's path is in
                          this list. Slug paths at every hierarchy level,
                          sorted: `ca/`, `ca/on/`, `ca/on/toronto/`,
                          `ca/on/scarborough/`. Derived from the travel zones
                          and physical locations on their live schedules (see
                          `locations`), resolved to the locality, its borough
                          and the wider municipality. Empty when the supplier
                          has no live schedule with a geocodable zone. Region
                          rows are pruned by a daily sweep, so this can lag a
                          schedule's `endDate` by up to a day, whereas
                          `locations` is evaluated on every request.
                        example:
                          - ca/
                          - ca/on/
                          - ca/on/scarborough/
                          - ca/on/toronto/
                      languages:
                        type: array
                        items:
                          type: string
                      locales:
                        type: array
                        items:
                          type: string
                      defaultLocale:
                        type: string
                    required:
                      - supplierId
                      - firstName
                      - lastName
                      - email
                      - active
                      - updatedAt
                      - avatarUrl
                      - services
                      - skills
                      - locations
                      - servedRegions
                      - languages
                      - locales
                required:
                  - data
        '400':
          description: Validation error or unknown service/skill id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '403':
          description: API key cannot access this project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '409':
          description: Duplicate email in project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
components:
  schemas:
    ErrorMessage:
      type: object
      properties:
        code:
          type: string
          description: Stable machine-readable error code, e.g. NOT_FOUND.
        message:
          type: string
          description: Human-readable description of what went wrong.
        statusCode:
          type: integer
          description: The HTTP status code of this response.
        requestId:
          type: string
          description: >-
            The id of this request, also returned as the X-Request-Id header.
            Quote it in a support ticket.
      required:
        - code
        - message
        - statusCode
        - requestId
      example:
        code: NOT_FOUND
        message: Booking not found
        statusCode: 404
        requestId: a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key minted in the MarketBox dashboard. Scope is restricted to the
        projects you select at creation time. Every route needs the key's
        standard API access (`*`) except `POST /v1/projects/{projectId}/events`,
        which needs `events:write`; a key without `*` is refused with 403
        `CAPABILITY_NOT_GRANTED`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.