{
  "opencollection": "1.0.0",
  "info": {
    "name": "Yokoy Card account Purchase order API",
    "version": "1.41.0"
  },
  "items": [
    {
      "info": {
        "name": "Purchase order",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List all purchase orders",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.yokoy.ai/v1/organizations/{organizationId}/legal-entities/:legalEntityId/invoice-purchase-orders",
            "headers": [
              {
                "name": "X-Yk-Auth-Method",
                "value": "yokoy"
              },
              {
                "name": "X-Yk-Correlation-Id",
                "value": "4ea8985e-80a2-40a0-8a40-401a1a1374b3"
              }
            ],
            "params": [
              {
                "name": "legalEntityId",
                "value": "aB9jQoE3HE",
                "type": "path",
                "description": "Yokoy unique ID of the legal entity (company)."
              },
              {
                "name": "filter",
                "value": "created ge 2024-03-02T09:00.000Z and customInformation.customField eq foo",
                "type": "query",
                "description": "Filter string used to restrict the data returned. You can use [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.4.2.2) filters."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://accounts[.test].yokoy.ai/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Retrieves all purchase orders for the legal entity identified in the path."
        },
        {
          "info": {
            "name": "Create a purchase order",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.yokoy.ai/v1/organizations/{organizationId}/legal-entities/:legalEntityId/invoice-purchase-orders",
            "headers": [
              {
                "name": "X-Yk-Auth-Method",
                "value": "yokoy"
              },
              {
                "name": "X-Yk-Correlation-Id",
                "value": "4ea8985e-80a2-40a0-8a40-401a1a1374b3"
              }
            ],
            "params": [
              {
                "name": "legalEntityId",
                "value": "aB9jQoE3HE",
                "type": "path",
                "description": "Yokoy unique ID of the legal entity (company)."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://accounts[.test].yokoy.ai/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Creates a new purchase order and returns the created entity."
        },
        {
          "info": {
            "name": "Get a purchase order by ID",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.yokoy.ai/v1/organizations/{organizationId}/legal-entities/:legalEntityId/invoice-purchase-orders/:purchaseOrderId",
            "headers": [
              {
                "name": "X-Yk-Auth-Method",
                "value": "yokoy"
              },
              {
                "name": "X-Yk-Correlation-Id",
                "value": "4ea8985e-80a2-40a0-8a40-401a1a1374b3"
              }
            ],
            "params": [
              {
                "name": "legalEntityId",
                "value": "aB9jQoE3HE",
                "type": "path",
                "description": "Yokoy unique ID of the legal entity (company)."
              },
              {
                "name": "purchaseOrderId",
                "value": "9L7rovNzNhTCsJSTkbfq",
                "type": "path",
                "description": "Yokoy unique ID of the purchase order."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://accounts[.test].yokoy.ai/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Retrieves a purchase order identified by its Yokoy unique ID."
        },
        {
          "info": {
            "name": "Update a purchase order",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.yokoy.ai/v1/organizations/{organizationId}/legal-entities/:legalEntityId/invoice-purchase-orders/:purchaseOrderId",
            "headers": [
              {
                "name": "X-Yk-Auth-Method",
                "value": "yokoy"
              },
              {
                "name": "X-Yk-Correlation-Id",
                "value": "4ea8985e-80a2-40a0-8a40-401a1a1374b3"
              }
            ],
            "params": [
              {
                "name": "legalEntityId",
                "value": "aB9jQoE3HE",
                "type": "path",
                "description": "Yokoy unique ID of the legal entity (company)."
              },
              {
                "name": "purchaseOrderId",
                "value": "9L7rovNzNhTCsJSTkbfq",
                "type": "path",
                "description": "Yokoy unique ID of the purchase order."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://accounts[.test].yokoy.ai/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Updates an invoice purchase order by replacing all attributes. The purchase order is specified by its Yokoy unique ID. The whole entity is returned."
        },
        {
          "info": {
            "name": "Modify a purchase order",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.yokoy.ai/v1/organizations/{organizationId}/legal-entities/:legalEntityId/invoice-purchase-orders/:purchaseOrderId",
            "headers": [
              {
                "name": "X-Yk-Auth-Method",
                "value": "yokoy"
              },
              {
                "name": "X-Yk-Correlation-Id",
                "value": "4ea8985e-80a2-40a0-8a40-401a1a1374b3"
              }
            ],
            "params": [
              {
                "name": "legalEntityId",
                "value": "aB9jQoE3HE",
                "type": "path",
                "description": "Yokoy unique ID of the legal entity (company)."
              },
              {
                "name": "purchaseOrderId",
                "value": "9L7rovNzNhTCsJSTkbfq",
                "type": "path",
                "description": "Yokoy unique ID of the purchase order."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://accounts[.test].yokoy.ai/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Updates a invoice purchase order by replacing some attributes. The purchase order is specified by its Yokoy unique ID. The whole entity is returned."
        }
      ]
    }
  ],
  "bundled": true
}