Skip to content

Commit 2e7a339

Browse files
authored
Merge pull request #1784 from codatio/oas-sync
Automated PR created by OAS bot
2 parents 3cf5f33 + 31c6691 commit 2e7a339

1 file changed

Lines changed: 172 additions & 32 deletions

File tree

static/oas/Codat-Sync-Payables.json

Lines changed: 172 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,7 +2294,7 @@
22942294
"Suppliers"
22952295
],
22962296
"summary": "List suppliers",
2297-
"description": "The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection.\n\n[Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.\n\nBy default, this endpoint returns a list of active and archived suppliers. You can use [querying](https://docs.codat.io/using-the-api/querying) to change that. \n\nFor example, to retrieve only active suppliers (i.e. `status=Active`) or suppliers created within the specified number of days (e.g. `sourceModifiedDate>2023-12-15T00:00:00.000Z`), query the endpoint as follows: `/payables/suppliers?query=sourceModifiedDate>2023-12-15T00:00:00.000Z&&status=Active`.For example, to retrieve active suppliers modified after a particular date use `query=sourceModifiedDate>2023-12-15T00:00:00.000Z&&status=Active`.",
2297+
"description": "The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection.\n\n[Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.\n\nBy default, this endpoint returns a list of active and archived suppliers. You can use [querying](https://docs.codat.io/using-the-api/querying) to change that. \n\nFor example, to retrieve only active suppliers (i.e. `status=Active`) or suppliers created within the specified number of days (e.g. `sourceModifiedDate>2023-12-15T00:00:00.000Z`), query the endpoint as follows: `/payables/suppliers?query=sourceModifiedDate>2023-12-15T00:00:00.000Z&&status=Active`.For example, to retrieve active suppliers modified after a particular date use `query=sourceModifiedDate>2023-12-15T00:00:00.000Z&&status=Active`.\n\n### Supported Integrations\n\n| Integration | Supported |\n|-------------------------------|-----------|\n| FreeAgent | Yes |\n| QuickBooks Online | Yes |\n| Xero | Yes |\n| Oracle NetSuite | Yes |\n| Sage Intacct | Yes |\n| Zoho Books | Yes |",
22982298
"operationId": "list-suppliers",
22992299
"parameters": [
23002300
{
@@ -2353,7 +2353,7 @@
23532353
"city": "Bakersfield",
23542354
"region": "California",
23552355
"country": "USA",
2356-
"postalcode": "93308"
2356+
"postalCode": "93308"
23572357
}
23582358
],
23592359
"status": "Active",
@@ -2421,7 +2421,7 @@
24212421
"Suppliers"
24222422
],
24232423
"summary": "Create supplier",
2424-
"description": "The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection.\r\n\r\n[Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.\r\n",
2424+
"description": "The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection.\r\n\r\n[Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.\r\n\r\n### Supported Integrations\r\n\r\n| Integration | Supported |\r\n|-------------------------------|-----------|\r\n| FreeAgent | Yes |\r\n| QuickBooks Online | Yes |\r\n| Xero | Yes |\r\n| Oracle NetSuite | Yes |\r\n| Sage Intacct | Yes |\r\n| Zoho Books | Yes |\r\n",
24252425
"operationId": "create-supplier",
24262426
"parameters": [
24272427
{
@@ -2442,9 +2442,9 @@
24422442
"examples": {
24432443
"Suppliers": {
24442444
"value": {
2445-
"supplierName": "Greggs",
2446-
"contactName": "Greg Greggs",
2447-
"emailAddress": "greg@greggs.com",
2445+
"supplierName": "Northridge Office Supplies",
2446+
"contactName": "Sarah Johnson",
2447+
"emailAddress": "sarah.johnson@northridgesupplies.co.uk",
24482448
"phone": "+44 (0)1223 322410",
24492449
"addresses": [
24502450
{
@@ -2453,7 +2453,7 @@
24532453
"line2": "2 Dennis Avenue",
24542454
"city": "London",
24552455
"region": "Camden",
2456-
"country": "GBR",
2456+
"country": "GB",
24572457
"postalCode": "EC1N 7TE"
24582458
}
24592459
],
@@ -2477,23 +2477,152 @@
24772477
"Suppliers": {
24782478
"value": {
24792479
"id": "sup-10933920",
2480-
"supplierName": "Greggs",
2481-
"contactName": "Greg Greggs",
2482-
"emailAddress": "greg@greggs.com",
2480+
"supplierName": "Northridge Office Supplies",
2481+
"contactName": "Sarah Johnson",
2482+
"emailAddress": "sarah.johnson@northridgesupplies.co.uk",
24832483
"phone": "+44 (0)1223 322410",
2484-
"address": [
2484+
"addresses": [
24852485
{
24862486
"type": "Billing",
24872487
"line1": "Flat 1",
24882488
"line2": "2 Dennis Avenue",
24892489
"city": "London",
24902490
"region": "Camden",
2491-
"country": "GBR",
2491+
"country": "GB",
24922492
"postalCode": "EC1N 7TE"
24932493
}
24942494
],
24952495
"status": "Active",
2496-
"defaultCurrency": "GBP"
2496+
"balance": 0,
2497+
"defaultCurrency": "GBP",
2498+
"sourceModifiedDate": "2026-03-18T10:30:00Z"
2499+
}
2500+
}
2501+
}
2502+
}
2503+
}
2504+
},
2505+
"400": {
2506+
"$ref": "#/components/responses/BadRequest"
2507+
},
2508+
"401": {
2509+
"$ref": "#/components/responses/Unauthorized"
2510+
},
2511+
"402": {
2512+
"$ref": "#/components/responses/Payment-Required"
2513+
},
2514+
"403": {
2515+
"$ref": "#/components/responses/Forbidden"
2516+
},
2517+
"404": {
2518+
"$ref": "#/components/responses/Not-Found"
2519+
},
2520+
"429": {
2521+
"$ref": "#/components/responses/Too-Many-Requests"
2522+
},
2523+
"500": {
2524+
"$ref": "#/components/responses/Internal-Server-Error"
2525+
},
2526+
"503": {
2527+
"$ref": "#/components/responses/Service-Unavailable"
2528+
}
2529+
}
2530+
}
2531+
},
2532+
"/companies/{companyId}/connections/{connectionId}/payables/suppliers/{supplierId}": {
2533+
"parameters": [
2534+
{
2535+
"$ref": "#/components/parameters/companyId"
2536+
},
2537+
{
2538+
"$ref": "#/components/parameters/connectionId"
2539+
},
2540+
{
2541+
"name": "supplierId",
2542+
"in": "path",
2543+
"required": true,
2544+
"schema": {
2545+
"type": "string",
2546+
"examples": [
2547+
"13d946f0-c5d5-42bc-b092-97ece17923ab",
2548+
"9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2",
2549+
7110701885,
2550+
"EILBDVJVNUAGVKRQ"
2551+
]
2552+
},
2553+
"description": "Unique identifier for a supplier."
2554+
}
2555+
],
2556+
"put": {
2557+
"tags": [
2558+
"Suppliers"
2559+
],
2560+
"summary": "Update supplier",
2561+
"description": "The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection.\n\n[Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.\n\nThis is a full-replace PUT endpoint. Any fields not included in the request body will be cleared on the supplier record.\n\n### Supported Integrations\n\n| Integration | Supported |\n|-------------------------------|-----------|\n| FreeAgent | Yes |\n| QuickBooks Online | Yes |\n| Xero | Yes |\n| Oracle NetSuite | No |\n| Sage Intacct | No |\n| Zoho Books | No |\n\n### Platform-specific behavior\n\n- **Xero**: Archived suppliers cannot be updated (returns `400`). Suppliers must be unarchived manually in the Xero UI before updating.\n- **QuickBooks Online**: Currency can only be set when creating a supplier, and cannot be changed via update.\n",
2562+
"operationId": "update-supplier",
2563+
"requestBody": {
2564+
"content": {
2565+
"application/json": {
2566+
"schema": {
2567+
"$ref": "#/components/schemas/Supplier/definitions/supplierPrototype"
2568+
},
2569+
"examples": {
2570+
"Update supplier": {
2571+
"value": {
2572+
"supplierName": "Northridge Office Supplies",
2573+
"contactName": "Sarah Johnson",
2574+
"emailAddress": "sarah.johnson@northridgesupplies.co.uk",
2575+
"phone": "+44 (0)1223 322410",
2576+
"addresses": [
2577+
{
2578+
"type": "Billing",
2579+
"line1": "Flat 1",
2580+
"line2": "2 Dennis Avenue",
2581+
"city": "London",
2582+
"region": "Camden",
2583+
"country": "GB",
2584+
"postalCode": "EC1N 7TE"
2585+
}
2586+
],
2587+
"status": "Active",
2588+
"defaultCurrency": "GBP"
2589+
}
2590+
}
2591+
}
2592+
}
2593+
}
2594+
},
2595+
"responses": {
2596+
"200": {
2597+
"description": "Success",
2598+
"content": {
2599+
"application/json": {
2600+
"schema": {
2601+
"$ref": "#/components/schemas/Supplier"
2602+
},
2603+
"examples": {
2604+
"Updated supplier": {
2605+
"value": {
2606+
"id": "sup-10933920",
2607+
"supplierName": "Northridge Office Supplies",
2608+
"contactName": "Sarah Johnson",
2609+
"emailAddress": "sarah.johnson@northridgesupplies.co.uk",
2610+
"phone": "+44 (0)1223 322410",
2611+
"addresses": [
2612+
{
2613+
"type": "Billing",
2614+
"line1": "Flat 1",
2615+
"line2": "2 Dennis Avenue",
2616+
"city": "London",
2617+
"region": "Camden",
2618+
"country": "GB",
2619+
"postalCode": "EC1N 7TE"
2620+
}
2621+
],
2622+
"status": "Active",
2623+
"balance": 0,
2624+
"defaultCurrency": "GBP",
2625+
"sourceModifiedDate": "2026-03-18T10:30:00Z"
24972626
}
24982627
}
24992628
}
@@ -2560,15 +2689,12 @@
25602689
"examples": {
25612690
"Bank account example": {
25622691
"value": {
2563-
"id": "fb623ab2-f6ff-4b22-b7d3-b7cc2a4aa0ea",
25642692
"nominalCode": "22",
25652693
"name": "Plutus - Payables - Bank Account 12",
25662694
"accountNumber": "0120 0440",
25672695
"sortCode": "50-50-50",
25682696
"currency": "GBP",
2569-
"accountType": "Debit",
2570-
"status": "Active",
2571-
"sourceModifiedDate": "2024-02-22T14:46:43.99Z"
2697+
"accountType": "Debit"
25722698
}
25732699
}
25742700
}
@@ -2583,7 +2709,21 @@
25832709
"schema": {
25842710
"$ref": "#/components/schemas/BankAccount"
25852711
},
2586-
"examples": {}
2712+
"examples": {
2713+
"Created bank account": {
2714+
"value": {
2715+
"id": "fb623ab2-f6ff-4b22-b7d3-b7cc2a4aa0ea",
2716+
"nominalCode": "22",
2717+
"name": "Plutus - Payables - Bank Account 12",
2718+
"accountNumber": "0120 0440",
2719+
"sortCode": "50-50-50",
2720+
"currency": "GBP",
2721+
"accountType": "Debit",
2722+
"status": "Active",
2723+
"sourceModifiedDate": "2024-02-22T14:46:43.99Z"
2724+
}
2725+
}
2726+
}
25872727
}
25882728
}
25892729
},
@@ -2718,7 +2858,7 @@
27182858
"country": {
27192859
"type": "string",
27202860
"nullable": true,
2721-
"description": "Country of the customer's address. For NetSuite, use the 2-digit [ISO 3166](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) country code."
2861+
"description": "Country of the address. We recommend using the 2-digit ISO 3166 country code (e.g. `GB`, `US`, `FR`) as this is accepted by all supported platforms."
27222862
},
27232863
"postalCode": {
27242864
"type": "string",
@@ -4745,26 +4885,26 @@
47454885
},
47464886
"examples": [
47474887
{
4748-
"id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F",
4749-
"supplierName": "Kelly's Industrial Supplies",
4750-
"contactName": "Kelly Ipsum",
4751-
"emailAddress": "sales@kellysupplies.com",
4752-
"phone": "07999 999999",
4888+
"id": "sup-10933920",
4889+
"supplierName": "Northridge Office Supplies",
4890+
"contactName": "Sarah Johnson",
4891+
"emailAddress": "sarah.johnson@northridgesupplies.co.uk",
4892+
"phone": "+44 (0)1223 322410",
47534893
"addresses": [
47544894
{
47554895
"type": "Billing",
4756-
"line1": "Unit 51",
4757-
"line2": "Bakersfield Industrial Estate",
4758-
"city": "Bakersfield",
4759-
"region": "California",
4760-
"country": "USA",
4761-
"postalcode": "93308"
4896+
"line1": "Flat 1",
4897+
"line2": "2 Dennis Avenue",
4898+
"city": "London",
4899+
"region": "Camden",
4900+
"country": "GB",
4901+
"postalCode": "EC1N 7TE"
47624902
}
47634903
],
47644904
"status": "Active",
4765-
"amount": 100,
4905+
"balance": 0,
47664906
"defaultCurrency": "GBP",
4767-
"sourceModifiedDate": "2022-10-23T00:00:00Z"
4907+
"sourceModifiedDate": "2026-03-18T10:30:00Z"
47684908
}
47694909
]
47704910
}

0 commit comments

Comments
 (0)