Kantata Kantata OX Knowledge Base
Release Notes
Status Page

External Payments

An external payment is a manual record of a payment made outside of Kantata OX. An external payment can be applied to an invoice, or just recorded directly to a project.

Fetching a list of External Payments

The external payments currently visible to the user that is logged-in.

This endpoint returns structured External Payment objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the external_payments top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
created_after
string <date-time>

Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.

created_before
string <date-time>

Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.

include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • invoice (Invoice) - The invoice (if any) for which the external payment was created.
  • user (User) - The user who created the external payment.
  • workspace (Workspace) - The project in which the external payment was created.
invoice_id
integer <int32>

Limit returned external payments to those paying the invoice with the specified ID.

only
string

Allows you to request one or more resources directly by ID. Multiple IDs can be supplied in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.

order
string
Default: "created_at:desc"

Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: created_at:asc, created_at:desc, id:asc, id:desc, updated_at:asc, and updated_at:desc.

page
integer <int32>
Default: 1
per_page
integer <int32> <= 200
Default: 20
updated_after
string <date-time>

Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.

updated_before
string <date-time>

Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.

user_id
integer <int32>

Limit returned external payments to those created by the user with the specified ID.

workspace_id
integer <int32>

Limit returned external payments to those logged within the specified workspace_id.

Responses
200

A list of External Payments have been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/external_payments
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "external_payments": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "invoices": {
    }
}

Creating a new External Payment

Creates an external payment for the specified project or invoice. If an invoice ID is provided, a payment is only created for that invoice when it's a single project invoice and in a non-draft pending state.

This endpoint returns structured External Payment objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the external_payments top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • invoice (Invoice) - The invoice (if any) for which the external payment was created.
  • user (User) - The user who created the external payment.
  • workspace (Workspace) - The project in which the external payment was created.
Request Body schema: application/json
required
object
workspace_id
required
integer <int32>

The ID of the project in which the payment will be created.

invoice_id
integer <int32>

The ID of the invoice (if any) that is being paid by the external payment. This automatically sets the amount attribute of the payment to the amount of the specified invoice, and will override any amount_in_cents parameter sent.

amount_in_cents
integer <int32>

Indicates that the payment is not for an invoice, and will be ignored if an invoice_id is provided. Must be in base cent units of the currency of the project in which the payment is created.

message
string

An optional string describing the payment (255 characters maximum).

Responses
200

External Payment has been created.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/external_payments
Request samples
application/json
{
  • "external_payment": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "external_payments": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "invoices": {
    }
}

Fetching a single External Payment

This endpoint returns structured External Payment objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the external_payments top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • invoice (Invoice) - The invoice (if any) for which the external payment was created.
  • user (User) - The user who created the external payment.
  • workspace (Workspace) - The project in which the external payment was created.
Responses
200

The External Payment has been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/external_payments/{id}
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "external_payments": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "invoices": {
    }
}

Deleting an existing External Payment

The response will contain no content and an HTTP 204 status code if the request was successful, or a standard Kantata OX error message explaining why the object could not be deleted.

Request
path Parameters
id
required
integer

The ID of the Model.

Responses
204

External Payment has been deleted.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

delete/external_payments/{id}
Request samples
Response samples
application/json
{
  • "errors": [
    ]
}