openapi: 3.0.0 info: contact: email: hello@unified.to url: https://unified.to/contact description: One API to Rule Them All termsOfService: https://unified.to/tos title: Unified.to account purchaseorder API version: '1.0' servers: - description: North American data region url: https://api.unified.to - description: European data region url: https://api-eu.unified.to - description: Australian data region url: https://api-au.unified.to security: - jwt: [] tags: - name: purchaseorder paths: /accounting/{connection_id}/purchaseorder: get: operationId: listAccountingPurchaseorders parameters: - in: query name: limit required: false schema: type: number - in: query name: offset required: false schema: type: number - description: Return only results whose updated date is equal or greater to this value (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) in: query name: updated_gte required: false schema: type: string - in: query name: sort required: false schema: type: string - in: query name: order required: false schema: type: string - description: Query string to search. eg. email address or name in: query name: query required: false schema: type: string - description: The contact ID to filter by (reference to AccountingContact) in: query name: contact_id required: false schema: type: string - description: The org ID to filter by (reference to AccountingOrganization) in: query name: org_id required: false schema: type: string - description: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - posted_at - contact_id - account_id - currency - total_amount - shipping_address - billing_address - status - lineitems - organization_id - raw type: string type: array - description: 'Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar' in: query name: raw required: false schema: type: string - description: ID of the connection in: path name: connection_id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountingPurchaseorders' description: Successful security: - jwt: [] summary: List all purchaseorders tags: - purchaseorder post: operationId: createAccountingPurchaseorder parameters: - description: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - posted_at - contact_id - account_id - currency - total_amount - shipping_address - billing_address - status - lineitems - organization_id - raw type: string type: array type: array - description: 'Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar' in: query name: raw required: false schema: type: string - description: ID of the connection in: path name: connection_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/AccountingPurchaseorder' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountingPurchaseorder' description: Successful security: - jwt: [] summary: Create a purchaseorder tags: - purchaseorder /accounting/{connection_id}/purchaseorder/{id}: delete: operationId: removeAccountingPurchaseorder parameters: - description: ID of the connection in: path name: connection_id required: true schema: type: string - description: ID of the Purchaseorder in: path name: id required: true schema: type: string responses: '200': description: Successful default: content: {} description: Successful headers: Content-Type: required: false schema: type: string security: - jwt: [] summary: Remove a purchaseorder tags: - purchaseorder get: operationId: getAccountingPurchaseorder parameters: - description: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - posted_at - contact_id - account_id - currency - total_amount - shipping_address - billing_address - status - lineitems - organization_id - raw type: string type: array type: array - description: 'Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar' in: query name: raw required: false schema: type: string - description: ID of the connection in: path name: connection_id required: true schema: type: string - description: ID of the Purchaseorder in: path name: id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountingPurchaseorder' description: Successful security: - jwt: [] summary: Retrieve a purchaseorder tags: - purchaseorder patch: operationId: patchAccountingPurchaseorder parameters: - description: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - posted_at - contact_id - account_id - currency - total_amount - shipping_address - billing_address - status - lineitems - organization_id - raw type: string type: array type: array - description: 'Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar' in: query name: raw required: false schema: type: string - description: ID of the connection in: path name: connection_id required: true schema: type: string - description: ID of the Purchaseorder in: path name: id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/AccountingPurchaseorder' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountingPurchaseorder' description: Successful security: - jwt: [] summary: Update a purchaseorder tags: - purchaseorder put: operationId: updateAccountingPurchaseorder parameters: - description: Fields to return in: query name: fields required: false schema: items: enum: - id - created_at - updated_at - posted_at - contact_id - account_id - currency - total_amount - shipping_address - billing_address - status - lineitems - organization_id - raw type: string type: array type: array - description: 'Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar' in: query name: raw required: false schema: type: string - description: ID of the connection in: path name: connection_id required: true schema: type: string - description: ID of the Purchaseorder in: path name: id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/AccountingPurchaseorder' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountingPurchaseorder' description: Successful security: - jwt: [] summary: Update a purchaseorder tags: - purchaseorder components: schemas: property_AccountingPurchaseorder_lineitems: items: $ref: '#/components/schemas/AccountingLineitem' type: array AccountingPurchaseorders: items: $ref: '#/components/schemas/AccountingPurchaseorder' type: array AccountingLineitem: properties: account_id: type: string category_ids: $ref: '#/components/schemas/property_AccountingLineitem_category_ids' created_at: format: date-time type: string discount_amount: type: number id: type: string item_description: type: string item_id: type: string item_name: type: string item_sku: type: string item_variants: $ref: '#/components/schemas/property_AccountingLineitem_item_variants' locations: $ref: '#/components/schemas/property_AccountingLineitem_locations' notes: type: string refund_amount: type: number refunded_at: format: date-time type: string tax_amount: type: number taxrate_id: type: string total_amount: type: number unit_amount: type: number unit_quantity: type: number updated_at: format: date-time type: string type: object AccountingPurchaseorder: properties: account_id: type: string billing_address: $ref: '#/components/schemas/property_AccountingPurchaseorder_billing_address' contact_id: type: string created_at: format: date-time type: string currency: type: string id: type: string lineitems: $ref: '#/components/schemas/property_AccountingPurchaseorder_lineitems' organization_id: type: string posted_at: format: date-time type: string raw: additionalProperties: true type: object shipping_address: $ref: '#/components/schemas/property_AccountingPurchaseorder_shipping_address' status: enum: - DRAFT - VOIDED - AUTHORIZED - PAID - PARTIALLY_PAID - PARTIALLY_REFUNDED - REFUNDED - SUBMITTED - DELETED type: string x-speakeasy-unknown-values: allow total_amount: type: number updated_at: format: date-time type: string type: object property_AccountingPurchaseorder_billing_address: properties: address1: type: string address2: type: string city: type: string country: type: string country_code: type: string postal_code: type: string region: type: string region_code: type: string type: object property_AccountingLineitem_item_variants: items: $ref: '#/components/schemas/AccountingReference' type: array property_AccountingPurchaseorder_shipping_address: properties: address1: type: string address2: type: string city: type: string country: type: string country_code: type: string postal_code: type: string region: type: string region_code: type: string type: object property_AccountingLineitem_locations: items: $ref: '#/components/schemas/AccountingReference' type: array AccountingReference: properties: id: type: string name: type: string type: object property_AccountingLineitem_category_ids: items: type: string type: array securitySchemes: jwt: in: header name: authorization type: apiKey externalDocs: description: API Documentation url: https://docs.unified.to