Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 168 additions & 7 deletions static/oas/Codat-Platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,151 @@
}
}
},
"/companies/{companyId}/syncSettings": {
"parameters": [
{
"$ref": "#/components/parameters/companyId"
}
],
"get": {
"summary": "Get company sync settings",
"tags": [
"Companies"
],
"operationId": "get-company-syncSettings",
"x-speakeasy-name-override": "get-company-sync-settings",
"description": "Retrieve the [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings) for a specific company. This includes how often data types should be queued to be updated, and how much history should be fetched.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompanySyncSettings"
},
"examples": {
"Example": {
"value": {
"companyId": "8a210b68-6988-11ed-a1eb-0242ac120002",
"settings": [
{
"dataType": "invoices",
"fetchOnFirstLink": true,
"syncSchedule": 24,
"syncOrder": 0,
"syncFromUtc": "2020-01-01T12:00:00.000Z",
"syncFromWindow": 24,
"monthsToSync": 24,
"isLocked": true
}
],
"overridesDefaults": true
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/Payment-Required"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/Not-Found"
},
"429": {
"$ref": "#/components/responses/Too-Many-Requests"
},
"500": {
"$ref": "#/components/responses/Internal-Server-Error"
},
"503": {
"$ref": "#/components/responses/Service-Unavailable"
}
}
},
"post": {
"summary": "Set company sync settings",
"description": "Set the sync settings for a specific company.",
"tags": [
"Companies"
],
"operationId": "set-company-syncSettings",
"x-speakeasy-name-override": "set-company-sync-settings",
"responses": {
"204": {
"description": "No Content"
},
"400": {
"$ref": "#/components/responses/Bad-Request"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/Payment-Required"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/Not-Found"
},
"429": {
"$ref": "#/components/responses/Too-Many-Requests"
},
"500": {
"$ref": "#/components/responses/Internal-Server-Error"
},
"503": {
"$ref": "#/components/responses/Service-Unavailable"
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"properties": {
"companyId": {
"type": "string",
"format": "uuid",
"example": "8a210b68-6988-11ed-a1eb-0242ac120002",
"description": "Unique identifier for your SMB in Codat."
},
"settings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SyncSetting"
}
},
"overridesDefaults": {
"type": "boolean",
"default": true,
"description": "Set to `True` if you want to override default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings)."
}
},
"required": [
"companyId",
"settings",
"overridesDefaults"
]
}
],
"type": "object"
}
}
},
"description": "Include a `syncSetting` object for each data type.\n`syncFromWindow`, `syncFromUTC` & `monthsToSync` only need to be included if you wish to set a value for them."
}
}
},
"/companies/{companyId}/connectionManagement/accessToken": {
"parameters": [
{
Expand Down Expand Up @@ -5152,7 +5297,7 @@
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/companyId/schema"
"$ref": "#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId"
},
"name": {
"type": "string",
Expand Down Expand Up @@ -5227,7 +5372,7 @@
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/companyId/schema"
"$ref": "#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId"
},
"name": {
"$ref": "#/components/schemas/Company/definitions/companyDetails/properties/name"
Expand Down Expand Up @@ -5374,6 +5519,25 @@
}
}
},
"CompanySyncSettings": {
"title": "Company sync settings",
"type": "object",
"properties": {
"companyId": {
"$ref": "#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId"
},
"settings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SyncSetting"
}
},
"overridesDefaults": {
"type": "boolean",
"description": "Set to `True` if you want to override the default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings)."
}
}
},
"CompanyWebhook": {
"title": "Company webhook",
"type": "object",
Expand Down Expand Up @@ -6735,7 +6899,7 @@
"description": "The type of data being pushed, eg invoices, customers."
},
"companyId": {
"$ref": "#/components/parameters/companyId/schema"
"$ref": "#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId"
},
"pushOperationKey": {
"type": "string",
Expand Down Expand Up @@ -7805,10 +7969,7 @@
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "8a210b68-6988-11ed-a1eb-0242ac120002",
"description": "Unique identifier for your SMB in Codat."
"$ref": "#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId"
},
"description": "Unique identifier for a company."
},
Expand Down
32 changes: 0 additions & 32 deletions static/oas/Codat-Spend-Insights.json
Original file line number Diff line number Diff line change
Expand Up @@ -1990,38 +1990,6 @@
}
}
},
"Malformed-Query": {
"description": "Your `query` parameter was not correctly formed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/responses/Conflict/content/application~1json/schema"
},
"examples": {
"Malformed query": {
"value": {
"statusCode": 400,
"service": "ClientsApi",
"error": "Error parsing query - Malformed query.",
"correlationId": "bc997528a9d7abb9161ef45f05d38599",
"canBeRetried": "Unknown",
"detailedErrorCode": 0
}
},
"Unresolved property": {
"value": {
"statusCode": 400,
"service": "PullApi",
"error": "Error parsing query - Could not resolve property isCompleted on Dataset",
"correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8",
"canBeRetried": "Unknown",
"detailedErrorCode": 0
}
}
}
}
}
},
"Unauthorized": {
"description": "Your API request was not properly authorized.",
"content": {
Expand Down
2 changes: 1 addition & 1 deletion static/oas/Codat-Sync-Commerce.json
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,7 @@
"type": "object",
"properties": {
"companyId": {
"$ref": "#/components/parameters/companyId"
"$ref": "#/components/parameters/companyId/schema"
},
"accountingSoftwareCompanyName": {
"type": "string",
Expand Down
Loading