API Documentation

API Endpoint

Purchase Orders

Purchase Orders

In Productive purchase orders are documents that serve as a buyer’s request to a seller to order goods or services. You can find out more about purchase orders in our Help documentation: Purchase Orders

Purchase Orders always belong to a budget and a vendor (seller). They can have multiple expenses, bills and bill items.

Following diagram shows services in our data hierarchy:

Purchase Order diagram

The enumeration status_id can be:

  • 1 (Draft)

  • 2 (Finalized)

The enumeration payment_status_id can be:

  • 1 (Not received)

  • 2 (Partially received)

  • 3 (Fully received)

Supported filter params

  • deal_id (array)

  • vendor_id (array)

  • id

  • deal_id

  • vendor_id

  • status_id

  • issued_on

  • delivery_on

  • sent_on

  • received_on

  • created_at

  • total_cost

  • total_cost_with_tax

  • total_received

Supported sort params

  • deal_id

  • vendor_id

  • deal_id

  • vendor_id

  • status_id

  • issued_on

  • delivery_on

  • sent_on

  • received_on

  • created_at

  • total_cost

  • total_cost_with_tax

  • total_received

GET /api/v2/purchase_orders/1
Requestsreturns purchase orders

GET  /api/v2/purchase_orders/22

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "22",
    "type": "purchase_orders",
    "attributes": {
      "subject": null,
      "status_id": null,
      "issued_on": "2026-03-17",
      "delivery_on": null,
      "sent_on": null,
      "received_on": null,
      "created_at": "2026-03-17T05:09:00.270+01:00",
      "number": "1",
      "note": null,
      "footer": null,
      "note_interpolated": null,
      "footer_interpolated": null,
      "email_key": "b6e213370bbc115c0620044804798abb",
      "payment_status_id": 3,
      "exchange_rate": "1.25",
      "exchange_date": "2026-03-17",
      "exported": false,
      "exported_at": null,
      "export_integration_type_id": null,
      "export_id": null,
      "export_url": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "total_cost": 0,
      "total_cost_default": 0,
      "total_cost_normalized": 0,
      "total_cost_with_tax": 0,
      "total_cost_with_tax_default": 0,
      "total_cost_with_tax_normalized": 0,
      "total_received": 0,
      "total_received_default": 0,
      "total_received_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1118"
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "attachment": {
        "meta": {
          "included": false
        }
      },
      "bill_to": {
        "meta": {
          "included": false
        }
      },
      "bill_from": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Gets a purchase order
GET/api/v2/purchase_orders/{id}

URI Parameters
HideShow
id
number (required) Example: 1

purchase order id


POST /api/v2/purchase_orders
Requestscreates purchase orderreturns error

POST  /api/v2/purchase_orders

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "purchase_orders",
    "attributes": {
      "currency": "EUR",
      "issued_on": "2026-03-17"
    },
    "relationships": {
      "deal": {
        "data": {
          "type": "quotes",
          "id": "787"
        }
      },
      "vendor": {
        "data": {
          "type": "clients",
          "id": "2809"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "24",
    "type": "purchase_orders",
    "attributes": {
      "subject": null,
      "status_id": 1,
      "issued_on": "2026-03-17",
      "delivery_on": null,
      "sent_on": null,
      "received_on": null,
      "created_at": "2026-03-17T05:09:00.410+01:00",
      "number": "2",
      "note": null,
      "footer": null,
      "note_interpolated": null,
      "footer_interpolated": null,
      "email_key": "7e387383a1af95a4f5cce6f37b24c3df",
      "payment_status_id": 3,
      "exchange_rate": "1.25",
      "exchange_date": "2026-03-17",
      "exported": false,
      "exported_at": null,
      "export_integration_type_id": null,
      "export_id": null,
      "export_url": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "total_cost": 0,
      "total_cost_default": 0,
      "total_cost_normalized": 0,
      "total_cost_with_tax": 0,
      "total_cost_with_tax_default": 0,
      "total_cost_with_tax_normalized": 0,
      "total_received": 0,
      "total_received_default": 0,
      "total_received_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1119"
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "attachment": {
        "meta": {
          "included": false
        }
      },
      "bill_to": {
        "meta": {
          "included": false
        }
      },
      "bill_from": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/purchase_orders

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "purchase_orders",
    "attributes": {
      "currency": "EUR",
      "issued_on": "2026-03-17"
    },
    "relationships": {
      "deal": {
        "data": {
          "type": "quotes",
          "id": "0"
        }
      },
      "vendor": {
        "data": {
          "type": "clients",
          "id": "2812"
        }
      }
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "attribute is invalid",
      "meta": {},
      "source": {
        "pointer": "data/attributes/deal"
      }
    }
  ]
}

Create a purchase order
POST/api/v2/purchase_orders


PATCH /api/v2/purchase_orders/1
Requestsupdates purchase orderreturns errorreturns error

PATCH  /api/v2/purchase_orders/28

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "purchase_orders",
    "attributes": {
      "currency": "EUR",
      "issued_on": "2026-03-17"
    },
    "relationships": {
      "deal": {
        "data": {
          "type": "quotes",
          "id": "792"
        }
      },
      "vendor": {
        "data": {
          "type": "clients",
          "id": "2824"
        }
      },
      "subscribers": {
        "data": [
          {
            "type": "people",
            "id": "3825"
          },
          {
            "type": "people",
            "id": "3826"
          }
        ]
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "28",
    "type": "purchase_orders",
    "attributes": {
      "subject": null,
      "status_id": 1,
      "issued_on": "2026-03-17",
      "delivery_on": null,
      "sent_on": null,
      "received_on": null,
      "created_at": "2026-03-17T05:09:00.875+01:00",
      "number": "1",
      "note": null,
      "footer": null,
      "note_interpolated": null,
      "footer_interpolated": null,
      "email_key": "699d9559927e65bc4119f2dc857977cd",
      "payment_status_id": 3,
      "exchange_rate": "1.25",
      "exchange_date": "2026-03-17",
      "exported": false,
      "exported_at": null,
      "export_integration_type_id": null,
      "export_id": null,
      "export_url": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "total_cost": 0,
      "total_cost_default": 0,
      "total_cost_normalized": 0,
      "total_cost_with_tax": 0,
      "total_cost_with_tax_default": 0,
      "total_cost_with_tax_normalized": 0,
      "total_received": 0,
      "total_received_default": 0,
      "total_received_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1123"
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "attachment": {
        "meta": {
          "included": false
        }
      },
      "bill_to": {
        "meta": {
          "included": false
        }
      },
      "bill_from": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/purchase_orders/29

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "purchase_order",
    "attributes": {
      "currency": "EUR",
      "issued_on": "2026-03-17"
    },
    "relationships": {
      "deal": {
        "data": {
          "type": "quotes",
          "id": "0"
        }
      }
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "attribute is invalid",
      "meta": {},
      "source": {
        "pointer": "data/attributes/deal"
      }
    }
  ]
}

PATCH  /api/v2/purchase_orders/30

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "purchase_order",
    "attributes": {},
    "relationships": {
      "deal": {
        "vendor": {
          "type": "clients",
          "id": "0"
        }
      }
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "meta": {},
      "source": {
        "pointer": "data/attributes/deal"
      }
    }
  ]
}

Update a purchase order
PATCH/api/v2/purchase_orders/{id}

URI Parameters
HideShow
id
number (required) Example: 1

purchase order id


DELETE /api/v2/purchase_orders/1
Requestsdeletes purchse_order

DELETE  /api/v2/purchase_orders/31

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a purchase order
DELETE/api/v2/purchase_orders/{id}

URI Parameters
HideShow
id
number (required) Example: 1

purchase order id


POST /api/v2/purchase_orders/copy
Requestscopy from templatecopy from templatecopies the purchase order and expenses

POST  /api/v2/purchase_orders/copy

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "purchase_order",
    "attributes": {
      "template_id": 32,
      "deal_id": 796
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "33",
    "type": "purchase_orders",
    "attributes": {
      "subject": "template",
      "status_id": null,
      "issued_on": "2026-03-17",
      "delivery_on": null,
      "sent_on": null,
      "received_on": null,
      "created_at": "2026-03-17T05:09:01.591+01:00",
      "number": "2",
      "note": null,
      "footer": null,
      "note_interpolated": null,
      "footer_interpolated": null,
      "email_key": "1d3214a8d43bfa16f3a3800516902452",
      "payment_status_id": 3,
      "exchange_rate": "1.25",
      "exchange_date": "2026-03-17",
      "exported": false,
      "exported_at": null,
      "export_integration_type_id": null,
      "export_id": null,
      "export_url": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "total_cost": 0,
      "total_cost_default": 0,
      "total_cost_normalized": 0,
      "total_cost_with_tax": 0,
      "total_cost_with_tax_default": 0,
      "total_cost_with_tax_normalized": 0,
      "total_received": 0,
      "total_received_default": 0,
      "total_received_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1127"
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "attachment": {
        "meta": {
          "included": false
        }
      },
      "bill_to": {
        "meta": {
          "included": false
        }
      },
      "bill_from": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/purchase_orders/copy

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "purchase_order",
    "attributes": {
      "template_id": 34,
      "deal_id": 798
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "35",
    "type": "purchase_orders",
    "attributes": {
      "subject": "template",
      "status_id": null,
      "issued_on": "2026-03-17",
      "delivery_on": null,
      "sent_on": null,
      "received_on": null,
      "created_at": "2026-03-17T05:09:01.869+01:00",
      "number": "2",
      "note": null,
      "footer": null,
      "note_interpolated": null,
      "footer_interpolated": null,
      "email_key": "ec100bf3a81f89a5306a04b9abfa45b4",
      "payment_status_id": 3,
      "exchange_rate": "1.25",
      "exchange_date": "2026-03-17",
      "exported": false,
      "exported_at": null,
      "export_integration_type_id": null,
      "export_id": null,
      "export_url": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "total_cost": 0,
      "total_cost_default": 0,
      "total_cost_normalized": 0,
      "total_cost_with_tax": 0,
      "total_cost_with_tax_default": 0,
      "total_cost_with_tax_normalized": 0,
      "total_received": 0,
      "total_received_default": 0,
      "total_received_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1128"
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "attachment": {
        "meta": {
          "included": false
        }
      },
      "bill_to": {
        "meta": {
          "included": false
        }
      },
      "bill_from": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/purchase_orders/copy

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "purchase_order",
    "attributes": {
      "template_id": 36,
      "deal_id": 800
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "37",
    "type": "purchase_orders",
    "attributes": {
      "subject": null,
      "status_id": null,
      "issued_on": "2026-03-17",
      "delivery_on": null,
      "sent_on": null,
      "received_on": null,
      "created_at": "2026-03-17T05:09:02.329+01:00",
      "number": "2",
      "note": null,
      "footer": null,
      "note_interpolated": null,
      "footer_interpolated": null,
      "email_key": "c4e3e1dbaacde69cc6abb0f9aa59016d",
      "payment_status_id": 1,
      "exchange_rate": "1.25",
      "exchange_date": "2026-03-17",
      "exported": false,
      "exported_at": null,
      "export_integration_type_id": null,
      "export_id": null,
      "export_url": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "total_cost": 10000,
      "total_cost_default": 12500,
      "total_cost_normalized": 10000,
      "total_cost_with_tax": 10000,
      "total_cost_with_tax_default": 12500,
      "total_cost_with_tax_normalized": 10000,
      "total_received": 0,
      "total_received_default": 0,
      "total_received_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1129"
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "attachment": {
        "meta": {
          "included": false
        }
      },
      "bill_to": {
        "meta": {
          "included": false
        }
      },
      "bill_from": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Copies a purchase order
POST/api/v2/purchase_orders/copy

URI Parameters
HideShow
id
number (required) Example: 1

purchase order id


PATCH /api/v2/purchase_orders/1/send
Requestssends purchase_order via mailreturns errorsends purchase_order via mail

PATCH  /api/v2/purchase_orders/38/send

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "purchase_orders",
    "attributes": {
      "to": [
        "test@email.com"
      ],
      "cc": [
        "test@productive.io",
        "test-2@productive.io"
      ],
      "bcc": [
        "mail@something.com"
      ],
      "subject": "Mail title",
      "body": "Lorem ipsum dolor si amet"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "38",
    "type": "purchase_orders",
    "attributes": {
      "subject": null,
      "status_id": null,
      "issued_on": "2026-03-17",
      "delivery_on": null,
      "sent_on": "2026-03-17",
      "received_on": null,
      "created_at": "2026-03-17T05:09:02.490+01:00",
      "number": "1",
      "note": null,
      "footer": null,
      "note_interpolated": null,
      "footer_interpolated": null,
      "email_key": "7a1d6e5e0be25ef502d9737063a303cc",
      "payment_status_id": 3,
      "exchange_rate": "1.25",
      "exchange_date": "2026-03-17",
      "exported": false,
      "exported_at": null,
      "export_integration_type_id": null,
      "export_id": null,
      "export_url": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "total_cost": 0,
      "total_cost_default": 0,
      "total_cost_normalized": 0,
      "total_cost_with_tax": 0,
      "total_cost_with_tax_default": 0,
      "total_cost_with_tax_normalized": 0,
      "total_received": 0,
      "total_received_default": 0,
      "total_received_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1130"
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "attachment": {
        "meta": {
          "included": false
        }
      },
      "bill_to": {
        "meta": {
          "included": false
        }
      },
      "bill_from": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/purchase_orders/42/send

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "purchase_orders",
    "attributes": {
      "to": [
        "invalid mail"
      ]
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "email_invalid",
      "title": "Invalid Attribute",
      "detail": "invalid mail is not an email",
      "meta": {},
      "source": {
        "pointer": "data/attributes/to"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "meta": {},
      "source": {
        "pointer": "data/attributes/subject"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "meta": {},
      "source": {
        "pointer": "data/attributes/body"
      }
    }
  ]
}

PATCH  /api/v2/purchase_orders/43/send

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "purchase_orders",
    "attributes": {
      "to": [
        "test@email.com"
      ],
      "cc": [
        "test@productive.io",
        "test-2@productive.io"
      ],
      "bcc": [
        "mail@something.com"
      ],
      "subject": "Mail title",
      "body": "Lorem ipsum dolor si amet"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "43",
    "type": "purchase_orders",
    "attributes": {
      "subject": null,
      "status_id": null,
      "issued_on": "2026-03-17",
      "delivery_on": null,
      "sent_on": "2026-03-17",
      "received_on": null,
      "created_at": "2026-03-17T05:09:03.777+01:00",
      "number": "1",
      "note": null,
      "footer": null,
      "note_interpolated": null,
      "footer_interpolated": null,
      "email_key": "469b6cb0682dd29c8b2624f0af68a1a1",
      "payment_status_id": 3,
      "exchange_rate": "1.25",
      "exchange_date": "2026-03-17",
      "exported": false,
      "exported_at": null,
      "export_integration_type_id": null,
      "export_id": null,
      "export_url": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "total_cost": 0,
      "total_cost_default": 0,
      "total_cost_normalized": 0,
      "total_cost_with_tax": 0,
      "total_cost_with_tax_default": 0,
      "total_cost_with_tax_normalized": 0,
      "total_received": 0,
      "total_received_default": 0,
      "total_received_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1135"
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "attachment": {
        "meta": {
          "included": false
        }
      },
      "bill_to": {
        "meta": {
          "included": false
        }
      },
      "bill_from": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Sends a purchase order
PATCH/api/v2/purchase_orders/{id}/send

URI Parameters
HideShow
id
number (required) Example: 1

purchase order id


PATCH /api/v2/purchase_orders/1/export
Requestsexports purchase order when company_reference_id and xero_status_id presentexports purchase order when company_reference_id not present

PATCH  /api/v2/purchase_orders/47/export

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "id": 47,
    "type": "purchase_orders",
    "attributes": {
      "company_reference_id": "1234",
      "xero_status_id": 3
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "47",
    "type": "purchase_orders",
    "attributes": {
      "subject": null,
      "status_id": 2,
      "issued_on": "2026-03-17",
      "delivery_on": null,
      "sent_on": null,
      "received_on": null,
      "created_at": "2026-03-17T05:09:05.003+01:00",
      "number": "XERO-123",
      "note": null,
      "footer": null,
      "note_interpolated": null,
      "footer_interpolated": null,
      "email_key": "d575f798a043217a293d6b091b794e34",
      "payment_status_id": 3,
      "exchange_rate": "1.25",
      "exchange_date": "2026-03-17",
      "exported": true,
      "exported_at": "2026-03-17T05:09:05.000+01:00",
      "export_integration_type_id": 3,
      "export_id": "test-id",
      "export_url": "https://go.xero.com/Accounts/Payable/PurchaseOrders/View/test-id",
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "total_cost": 0,
      "total_cost_default": 0,
      "total_cost_normalized": 0,
      "total_cost_with_tax": 0,
      "total_cost_with_tax_default": 0,
      "total_cost_with_tax_normalized": 0,
      "total_received": 0,
      "total_received_default": 0,
      "total_received_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1139"
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "attachment": {
        "meta": {
          "included": false
        }
      },
      "bill_to": {
        "meta": {
          "included": false
        }
      },
      "bill_from": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/purchase_orders/48/export

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "id": 48,
    "type": "purchase_orders",
    "attributes": {}
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "48",
    "type": "purchase_orders",
    "attributes": {
      "subject": null,
      "status_id": 2,
      "issued_on": "2026-03-17",
      "delivery_on": null,
      "sent_on": null,
      "received_on": null,
      "created_at": "2026-03-17T05:09:05.137+01:00",
      "number": "XERO-123",
      "note": null,
      "footer": null,
      "note_interpolated": null,
      "footer_interpolated": null,
      "email_key": "145c57a424ba3c0657d0aa76672fe69c",
      "payment_status_id": 3,
      "exchange_rate": "1.25",
      "exchange_date": "2026-03-17",
      "exported": true,
      "exported_at": "2026-03-17T05:09:05.000+01:00",
      "export_integration_type_id": 3,
      "export_id": "test-id",
      "export_url": "https://go.xero.com/Accounts/Payable/PurchaseOrders/View/test-id",
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "total_cost": 0,
      "total_cost_default": 0,
      "total_cost_normalized": 0,
      "total_cost_with_tax": 0,
      "total_cost_with_tax_default": 0,
      "total_cost_with_tax_normalized": 0,
      "total_received": 0,
      "total_received_default": 0,
      "total_received_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1140"
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "attachment": {
        "meta": {
          "included": false
        }
      },
      "bill_to": {
        "meta": {
          "included": false
        }
      },
      "bill_from": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Exports a purchase order
PATCH/api/v2/purchase_orders/{id}/export

URI Parameters
HideShow
id
number (required) Example: 1

purchase order id

company_reference_id
string (optional) Example: 123

company reference id


PATCH /api/v2/purchase_orders/1/export_update
Requestsupdates purchase order in Xero

PATCH  /api/v2/purchase_orders/49/export_update

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "49",
    "type": "purchase_orders",
    "attributes": {
      "subject": null,
      "status_id": 2,
      "issued_on": "2026-03-17",
      "delivery_on": null,
      "sent_on": null,
      "received_on": null,
      "created_at": "2026-03-17T05:09:05.270+01:00",
      "number": "XERO-123",
      "note": null,
      "footer": null,
      "note_interpolated": null,
      "footer_interpolated": null,
      "email_key": "4580598296b233c799fbc21254f74310",
      "payment_status_id": 3,
      "exchange_rate": "1.25",
      "exchange_date": "2026-03-17",
      "exported": true,
      "exported_at": "2026-03-17T05:09:05.000+01:00",
      "export_integration_type_id": 3,
      "export_id": "test-id",
      "export_url": "https://go.xero.com/Accounts/Payable/PurchaseOrders/View/test-id",
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "total_cost": 0,
      "total_cost_default": 0,
      "total_cost_normalized": 0,
      "total_cost_with_tax": 0,
      "total_cost_with_tax_default": 0,
      "total_cost_with_tax_normalized": 0,
      "total_received": 0,
      "total_received_default": 0,
      "total_received_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1141"
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "attachment": {
        "meta": {
          "included": false
        }
      },
      "bill_to": {
        "meta": {
          "included": false
        }
      },
      "bill_from": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Updates exported purchase order
PATCH/api/v2/purchase_orders/{id}/export_update

URI Parameters
HideShow
id
number (required) Example: 1

purchase order id

company_reference_id
string (optional) Example: 123

company reference id


Generated by aglio on 17 Mar 2026