openapi: 3.0.3 info: title: Fulfil REST API (v2) Authentication Inventory & Stock API description: 'Fulfil is a cloud ERP and operations platform for e-commerce, DTC, and wholesale merchants. Its REST API (v2) exposes every ERP resource through a single, uniform "model interface": each business object (sales orders, products, stock moves, parties, shipments, purchases, production, and thousands more) is a named model addressed at `/api/v2/model/{model.name}`, with generic CRUD, a `search_read` search, `count`, and the ability to call arbitrary model methods (actions), run reports, and drive wizards. Fulfil advertises 6,000+ endpoints across all models. The base URL is per-merchant: `https://{merchant_id}.fulfil.io/api/v2`. Authentication is either a personal access token sent in the `X-API-KEY` header (or as HTTP Basic) for private integrations, or OAuth 2.0 for public apps. Use `GET /api/v2/test` to verify credentials. Fulfil records are model-specific and dynamically typed, so request and response bodies below are represented as open JSON objects (a `Record` is an object with an integer `id` plus arbitrary model fields). This document models the generic interface plus concrete headline models; the same interface applies to any other Fulfil model by substituting its name.' version: '2.0' contact: name: Fulfil Developer Documentation url: https://developers.fulfil.io/ license: name: Proprietary url: https://www.fulfil.io/ servers: - url: https://{merchant_id}.fulfil.io/api/v2 description: Fulfil merchant instance variables: merchant_id: default: mystore description: Your Fulfil merchant subdomain. security: - apiKeyAuth: [] - oauth2: [] tags: - name: Inventory & Stock description: Inventory via stock.move and stock.location models. paths: /model/stock.move: get: operationId: searchStockMoves tags: - Inventory & Stock summary: Search stock moves description: Searches inventory movements (stock.move) - transfers, adjustments, and shipment moves. parameters: - $ref: '#/components/parameters/Filter' - $ref: '#/components/parameters/Fields' - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPage' responses: '200': $ref: '#/components/responses/RecordList' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createStockMoves tags: - Inventory & Stock summary: Create stock moves description: Creates one or more inventory movements (stock.move). requestBody: $ref: '#/components/requestBodies/RecordArray' responses: '201': $ref: '#/components/responses/RecordList' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /model/stock.location: get: operationId: searchStockLocations tags: - Inventory & Stock summary: Search stock locations description: Searches warehouses, zones, and bins (stock.location). parameters: - $ref: '#/components/parameters/Filter' - $ref: '#/components/parameters/Fields' - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPage' responses: '200': $ref: '#/components/responses/RecordList' '401': $ref: '#/components/responses/Unauthorized' components: parameters: PerPage: name: per_page in: query required: false description: Number of records per page. schema: type: integer default: 100 Filter: name: filter in: query required: false description: A Fulfil domain filter (JSON-encoded list of clauses). schema: type: string Fields: name: fields in: query required: false description: Comma-separated list of fields to return. schema: type: string Page: name: page in: query required: false description: Page number for pagination. schema: type: integer default: 1 responses: ValidationError: description: The request payload failed validation. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid credentials. content: application/json: schema: $ref: '#/components/schemas/Error' RecordList: description: A list of records. content: application/json: schema: type: array items: $ref: '#/components/schemas/Record' requestBodies: RecordArray: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/Record' schemas: Error: type: object properties: type: type: string message: type: string code: type: integer Record: type: object description: A Fulfil record. Fields vary by model; every persisted record has an integer id. Additional model-specific fields are permitted. properties: id: type: integer additionalProperties: true securitySchemes: apiKeyAuth: type: apiKey in: header name: X-API-KEY description: Personal access token for private integrations, sent in the X-API-KEY header. Fulfil also accepts the token via HTTP Basic authentication. oauth2: type: oauth2 description: OAuth 2.0 authorization code flow for public apps. flows: authorizationCode: authorizationUrl: https://{merchant_id}.fulfil.io/oauth/authorize tokenUrl: https://{merchant_id}.fulfil.io/oauth/token scopes: {}