Purchase Orders

Create new purchase order

Changed on
post/purchaseorders

Request

  • Base URL
    https://api.getmaintainx.com/v1
  • Auth
    HTTP bearer

Query parameters

skipWebhookboolean

Set skipWebhook=true, skipWebhook=1 or skipWebhook=yes to skip all webhooks upon successful operation on the endpoint. Learn more about webhooks

Headers

x-organization-idinteger

Required if using a multi organizations token

Request body

notestring nullable

Notes left for Purchase Orders

dueDatestring nullable

Due date of Purchase Order

vendorIdnumber nullable required

ID of vendor that this Purchase Order is associated with

overrideNumberstring nullable

Custom number/identifier for Purchase Order

deletedAtstring date-time nullable

Date at which the Purchase Order was deleted

vendorContactIdsnumber[]

List of vendor contact IDs in the Purchase Order

shippingAddressIdnumber nullable

Shipping address Id in the Purchase Order

billingAddressIdnumber nullable

Billing address Id in the Purchase Order

extraFieldsobject

Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: "Ordered Date")

titlestring nullable

Title of the Purchase Order. Will be ignored if organization setting for custom purchase order titles is disabled.

Example request

{
  "note": "Please deliver during business hours",
  "dueDate": "2022-01-01T00:00:00.000Z",
  "vendorId": 432,
  "overrideNumber": "A123",
  "deletedAt": "2022-01-01T00:00:00.000Z",
  "vendorContactIds": [
    12,
    34,
    56
  ],
  "shippingAddress": {
    "city": "Montreal",
    "country": "Canada",
    "postalCode": "H4B 5G0",
    "state": "Quebec",
    "street": "1909 Avenue des Canadiens-de-Montréal",
    "label": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA "
  },
  "billingAddress": {
    "city": "Montreal",
    "country": "Canada",
    "postalCode": "H4B 5G0",
    "state": "Quebec",
    "street": "1909 Avenue des Canadiens-de-Montréal",
    "label": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA "
  },
  "extraFields": {
    "Ordered Date": "2023-01-01"
  },
  "items": [
    {
      "partId": 43,
      "price": 25000,
      "quantityOrdered": 4,
      "quantityReceived": 3,
      "unitCost": 125000,
      "lineExtraFields": {
        "Ordered Date": "2023-01-01"
      }
    }
  ],
  "costs": [
    {
      "name": "Sales Tax",
      "type": "AMOUNT_TAXABLE",
      "amount": 125000
    }
  ],
  "title": "Office Supplies Order"
}

Response

Successfully created Purchase Order

idnumber required

Global ID of the Purchase Order

notestring nullable

Notes left for Purchase Orders

titlestring nullable

Title of the Purchase Order.

reviewNotestring nullable

Notes to be left for changes to be made when sending a Purchase Order for revision

dueDatestring nullable

Due date of Purchase Order

creatorIdnumber

ID of the user that created this Purchase Order

vendorIdnumber nullable

ID of vendor that this Purchase Order is associated with

autoGeneratedNumbernumber nullable

Autogenerated Purchase Order number

overrideNumberstring nullable

Custom number/identifier for Purchase Order

approverIdnumber nullable

ID of the user who approved the Purchase Order

approvalDatestring nullable

Date the Purchase Order was approved

createdAtstring date-time nullable

Date the Purchase Order was created

updatedAtstring nullable

Date the Purchase Order was last updated

deletedAtstring date-time nullable

Date at which the Purchase Order was deleted

vendorContactIdsnumber[]

List of vendor contact IDs in the Purchase Order

extraFieldsobject

Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: "Ordered Date")

status'APPROVED' | 'CANCELED' | 'COMPLETED' | 'DECLINED' | 'PARTIALLY_FULFILLED' | 'PENDING' | 'REQUESTED' nullable required

Status of the Purchase Order.

Example response

{
  "id": 135,
  "note": "Please deliver during business hours",
  "title": "Office Supplies Order",
  "reviewNote": "Please adjust quantities and resubmit",
  "dueDate": "2022-01-01T00:00:00.000Z",
  "creatorId": 432,
  "vendorId": 432,
  "autoGeneratedNumber": 987,
  "overrideNumber": "A123",
  "approverId": 135,
  "approvalDate": "2022-01-01T00:00:00.000Z",
  "createdAt": "2022-01-01T00:00:00.000Z",
  "updatedAt": "2022-01-01T00:00:00.000Z",
  "deletedAt": "2022-01-01T00:00:00.000Z",
  "items": [
    {
      "id": 23,
      "partId": 43,
      "price": 25000,
      "priceDecimal": "250.000000",
      "quantityOrdered": 4,
      "quantityReceived": 3,
      "unitCost": 125000,
      "unitCostDecimal": "1250.000000",
      "fulfillments": [
        {
          "id": 23,
          "locationId": 852,
          "quantityReceived": "3.000000",
          "isLegacy": true
        }
      ],
      "lineExtraFields": {
        "Ordered Date": "2023-01-01"
      },
      "partExtraFields": {
        "Part Number": "321"
      }
    }
  ],
  "costs": [
    {
      "id": 123,
      "name": "Sales Tax",
      "type": "AMOUNT_TAXABLE",
      "amount": 125000
    }
  ],
  "thumbnail": {
    "id": 12345,
    "mimeType": "image/png",
    "fileName": "image.png",
    "url": "http://example.com/image.png",
    "createdAt": "2022-01-01T00:00:00.000Z",
    "width": 220,
    "height": 100
  },
  "attachments": [
    {
      "id": 12345,
      "mimeType": "image/png",
      "fileName": "image.png",
      "url": "http://example.com/image.png",
      "createdAt": "2022-01-01T00:00:00.000Z",
      "width": 220,
      "height": 100
    }
  ],
  "vendorContactIds": [
    12,
    34,
    56
  ],
  "shippingAddress": {
    "city": "Montreal",
    "country": "Canada",
    "postalCode": "H4B 5G0",
    "state": "Quebec",
    "street": "1909 Avenue des Canadiens-de-Montréal",
    "label": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA "
  },
  "billingAddress": {
    "city": "Montreal",
    "country": "Canada",
    "postalCode": "H4B 5G0",
    "state": "Quebec",
    "street": "1909 Avenue des Canadiens-de-Montréal",
    "label": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA "
  },
  "extraFields": {
    "Ordered Date": "2023-01-01"
  },
  "status": "APPROVED"
}

Changes

    • warning

      added the new APPROVED enum value to the response property for the response status

    • warning

      added the new CANCELED enum value to the response property for the response status

    • warning

      added the new COMPLETED enum value to the response property for the response status

    • warning

      added the new DECLINED enum value to the response property for the response status

    • warning

      added the new PARTIALLY_FULFILLED enum value to the response property for the response status

    • warning

      added the new PENDING enum value to the response property for the response status

    • warning

      added the new REQUESTED enum value to the response property for the response status

    • breaking

      removed the media type application/octet-stream from the request body

    • breaking

      request property // was restricted to a list of enum values

    • breaking

      the response property became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became optional for the status

    • breaking

      the response property // became optional for the status

    • breaking

      the response property // became optional for the status

    • breaking

      the response property // became optional for the status

    • breaking

      the response property // became optional for the status

    • breaking

      the response property // became optional for the status

    • breaking

      the response property // became optional for the status

    • breaking

      the response property // became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      added the new AMOUNT_NON_TAXABLE enum value to the // response property for the response status

    • warning

      added the new AMOUNT_TAXABLE enum value to the // response property for the response status

    • warning

      added the new PERCENT_TAXABLE enum value to the // response property for the response status

    • info

      added the new optional header request parameter x-organization-id

    • info

      added the new optional query request parameter skipWebhook

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request property became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      added the new AMOUNT_NON_TAXABLE enum value to the request property //

    • info

      added the new AMOUNT_TAXABLE enum value to the request property //

    • info

      added the new PERCENT_TAXABLE enum value to the request property //

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status