(accounting.bill_payments)
- list - List Bill Payments
- create - Create Bill Payment
- get - Get Bill Payment
- update - Update Bill Payment
- delete - Delete Bill Payment
List Bill Payments
import apideck_unify
from apideck_unify import Apideck
import dateutil.parser
import os
with Apideck(
api_key=os.getenv("APIDECK_API_KEY", ""),
consumer_id="test-consumer",
app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:
res = apideck.accounting.bill_payments.list(service_id="salesforce", filter_={
"updated_since": dateutil.parser.isoparse("2020-09-30T07:43:32.000Z"),
}, sort={
"by": apideck_unify.PaymentsSortBy.UPDATED_AT,
"direction": apideck_unify.SortDirection.DESC,
}, pass_through={
"search": "San Francisco",
}, fields="id,updated_at")
while res is not None:
# Handle items
res = res.next()
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
raw |
Optional[bool] | ➖ | Include raw response. Mostly used for debugging purposes | |
service_id |
Optional[str] | ➖ | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce |
cursor |
OptionalNullable[str] | ➖ | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | |
limit |
Optional[int] | ➖ | Number of results to return. Minimum 1, Maximum 200, Default 20 | |
filter_ |
Optional[models.PaymentsFilter] | ➖ | Apply filters | { "updated_since": "2020-09-30T07:43:32.000Z" } |
sort |
Optional[models.PaymentsSort] | ➖ | Apply sorting | { "by": "updated_at", "direction": "desc" } |
pass_through |
Dict[str, Any] | ➖ | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | { "search": "San Francisco" } |
fields |
OptionalNullable[str] | ➖ | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: fields=name,email,addresses.city In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
id,updated_at |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.AccountingBillPaymentsAllResponse
Error Type | Status Code | Content Type |
---|---|---|
models.BadRequestResponse | 400 | application/json |
models.UnauthorizedResponse | 401 | application/json |
models.PaymentRequiredResponse | 402 | application/json |
models.NotFoundResponse | 404 | application/json |
models.UnprocessableResponse | 422 | application/json |
models.APIError | 4XX, 5XX | */* |
Create Bill Payment
import apideck_unify
from apideck_unify import Apideck
import dateutil.parser
import os
with Apideck(
api_key=os.getenv("APIDECK_API_KEY", ""),
consumer_id="test-consumer",
app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:
res = apideck.accounting.bill_payments.create(total_amount=49.99, transaction_date=dateutil.parser.isoparse("2021-05-01T12:00:00.000Z"), service_id="salesforce", currency=apideck_unify.Currency.USD, currency_rate=0.69, reference="123456", payment_method="cash", payment_method_reference="123456", payment_method_id="12345", account={
"id": "123456",
"nominal_code": "N091",
"code": "453",
}, supplier={
"id": "12345",
"display_name": "Windsurf Shop",
"address": {
"id": "123",
"type": apideck_unify.Type.PRIMARY,
"string": "25 Spring Street, Blackburn, VIC 3130",
"name": "HQ US",
"line1": "Main street",
"line2": "apt #",
"line3": "Suite #",
"line4": "delivery instructions",
"street_number": "25",
"city": "San Francisco",
"state": "CA",
"postal_code": "94104",
"country": "US",
"latitude": "40.759211",
"longitude": "-73.984638",
"county": "Santa Clara",
"contact_name": "Elon Musk",
"salutation": "Mr",
"phone_number": "111-111-1111",
"fax": "122-111-1111",
"email": "elon@musk.com",
"website": "https://elonmusk.com",
"notes": "Address notes or delivery instructions.",
"row_version": "1-12345",
},
}, company_id="12345", reconciled=True, status=apideck_unify.PaymentStatus.AUTHORISED, type_=apideck_unify.BillPaymentType.ACCOUNTS_PAYABLE, allocations=[
{
"id": "12345",
"type": apideck_unify.BillPaymentAllocationType.BILL,
"amount": 49.99,
"allocation_id": "123456",
},
], note="Some notes about this transaction", number="123456", tracking_categories=[
{
"id": "123456",
"name": "New York",
},
{
"id": "123456",
"name": "New York",
},
], custom_fields=[
{
"id": "2389328923893298",
"name": "employee_level",
"description": "Employee Level",
"value": "Uses Salesforce and Marketo",
},
], row_version="1-12345", display_id="123456", pass_through=[
])
assert res.create_bill_payment_response is not None
# Handle response
print(res.create_bill_payment_response)
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
total_amount |
Nullable[float] | ✔️ | The total amount of the transaction | 49.99 |
transaction_date |
date | ✔️ | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z |
raw |
Optional[bool] | ➖ | Include raw response. Mostly used for debugging purposes | |
service_id |
Optional[str] | ➖ | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce |
currency |
OptionalNullable[models.Currency] | ➖ | Indicates the associated currency for an amount of money. Values correspond to ISO 4217. | USD |
currency_rate |
OptionalNullable[float] | ➖ | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 |
reference |
OptionalNullable[str] | ➖ | Optional transaction reference message ie: Debit remittance detail. | 123456 |
payment_method |
OptionalNullable[str] | ➖ | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash |
payment_method_reference |
OptionalNullable[str] | ➖ | Optional reference message returned by payment method on processing | 123456 |
payment_method_id |
OptionalNullable[str] | ➖ | A unique identifier for an object. | 12345 |
account |
OptionalNullable[models.LinkedLedgerAccountInput] | ➖ | N/A | |
supplier |
OptionalNullable[models.LinkedSupplierInput] | ➖ | The supplier this entity is linked to. | |
company_id |
OptionalNullable[str] | ➖ | The company or subsidiary id the transaction belongs to | 12345 |
reconciled |
OptionalNullable[bool] | ➖ | Indicates if the transaction has been reconciled. | true |
status |
Optional[models.PaymentStatus] | ➖ | Status of payment | authorised |
type |
Optional[models.BillPaymentType] | ➖ | Type of payment | accounts_payable |
allocations |
List[models.BillPaymentAllocations] | ➖ | N/A | |
note |
OptionalNullable[str] | ➖ | Note associated with the transaction | Some notes about this transaction |
number |
OptionalNullable[str] | ➖ | Number associated with the transaction | 123456 |
tracking_categories |
List[models.LinkedTrackingCategory] | ➖ | A list of linked tracking categories. | |
custom_fields |
List[models.CustomField] | ➖ | N/A | |
row_version |
OptionalNullable[str] | ➖ | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 |
display_id |
OptionalNullable[str] | ➖ | Id to be displayed. | 123456 |
pass_through |
List[models.PassThroughBody] | ➖ | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.AccountingBillPaymentsAddResponse
Error Type | Status Code | Content Type |
---|---|---|
models.BadRequestResponse | 400 | application/json |
models.UnauthorizedResponse | 401 | application/json |
models.PaymentRequiredResponse | 402 | application/json |
models.NotFoundResponse | 404 | application/json |
models.UnprocessableResponse | 422 | application/json |
models.APIError | 4XX, 5XX | */* |
Get Bill Payment
from apideck_unify import Apideck
import os
with Apideck(
api_key=os.getenv("APIDECK_API_KEY", ""),
consumer_id="test-consumer",
app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:
res = apideck.accounting.bill_payments.get(id="<id>", service_id="salesforce", fields="id,updated_at")
assert res.get_bill_payment_response is not None
# Handle response
print(res.get_bill_payment_response)
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
id |
str | ✔️ | ID of the record you are acting upon. | |
service_id |
Optional[str] | ➖ | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce |
raw |
Optional[bool] | ➖ | Include raw response. Mostly used for debugging purposes | |
fields |
OptionalNullable[str] | ➖ | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: fields=name,email,addresses.city In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
id,updated_at |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.AccountingBillPaymentsOneResponse
Error Type | Status Code | Content Type |
---|---|---|
models.BadRequestResponse | 400 | application/json |
models.UnauthorizedResponse | 401 | application/json |
models.PaymentRequiredResponse | 402 | application/json |
models.NotFoundResponse | 404 | application/json |
models.UnprocessableResponse | 422 | application/json |
models.APIError | 4XX, 5XX | */* |
Update Bill Payment
import apideck_unify
from apideck_unify import Apideck
import dateutil.parser
import os
with Apideck(
api_key=os.getenv("APIDECK_API_KEY", ""),
consumer_id="test-consumer",
app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:
res = apideck.accounting.bill_payments.update(id="<id>", total_amount=49.99, transaction_date=dateutil.parser.isoparse("2021-05-01T12:00:00.000Z"), service_id="salesforce", currency=apideck_unify.Currency.USD, currency_rate=0.69, reference="123456", payment_method="cash", payment_method_reference="123456", payment_method_id="12345", account={
"id": "123456",
"nominal_code": "N091",
"code": "453",
}, supplier={
"id": "12345",
"display_name": "Windsurf Shop",
"address": {
"id": "123",
"type": apideck_unify.Type.PRIMARY,
"string": "25 Spring Street, Blackburn, VIC 3130",
"name": "HQ US",
"line1": "Main street",
"line2": "apt #",
"line3": "Suite #",
"line4": "delivery instructions",
"street_number": "25",
"city": "San Francisco",
"state": "CA",
"postal_code": "94104",
"country": "US",
"latitude": "40.759211",
"longitude": "-73.984638",
"county": "Santa Clara",
"contact_name": "Elon Musk",
"salutation": "Mr",
"phone_number": "111-111-1111",
"fax": "122-111-1111",
"email": "elon@musk.com",
"website": "https://elonmusk.com",
"notes": "Address notes or delivery instructions.",
"row_version": "1-12345",
},
}, company_id="12345", reconciled=True, status=apideck_unify.PaymentStatus.AUTHORISED, type_=apideck_unify.BillPaymentType.ACCOUNTS_PAYABLE, allocations=[
{
"id": "12345",
"type": apideck_unify.BillPaymentAllocationType.BILL,
"amount": 49.99,
"allocation_id": "123456",
},
{
"id": "12345",
"type": apideck_unify.BillPaymentAllocationType.BILL,
"amount": 49.99,
"allocation_id": "123456",
},
{
"id": "12345",
"type": apideck_unify.BillPaymentAllocationType.BILL,
"amount": 49.99,
"allocation_id": "123456",
},
], note="Some notes about this transaction", number="123456", tracking_categories=[
{
"id": "123456",
"name": "New York",
},
{
"id": "123456",
"name": "New York",
},
], custom_fields=[
{
"id": "2389328923893298",
"name": "employee_level",
"description": "Employee Level",
},
], row_version="1-12345", display_id="123456", pass_through=[
{
"service_id": "<id>",
"extend_paths": [
{
"path": "$.nested.property",
"value": {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
{
"path": "$.nested.property",
"value": {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
{
"path": "$.nested.property",
"value": {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
])
assert res.update_bill_payment_response is not None
# Handle response
print(res.update_bill_payment_response)
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
id |
str | ✔️ | ID of the record you are acting upon. | |
total_amount |
Nullable[float] | ✔️ | The total amount of the transaction | 49.99 |
transaction_date |
date | ✔️ | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z |
service_id |
Optional[str] | ➖ | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce |
raw |
Optional[bool] | ➖ | Include raw response. Mostly used for debugging purposes | |
currency |
OptionalNullable[models.Currency] | ➖ | Indicates the associated currency for an amount of money. Values correspond to ISO 4217. | USD |
currency_rate |
OptionalNullable[float] | ➖ | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 |
reference |
OptionalNullable[str] | ➖ | Optional transaction reference message ie: Debit remittance detail. | 123456 |
payment_method |
OptionalNullable[str] | ➖ | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash |
payment_method_reference |
OptionalNullable[str] | ➖ | Optional reference message returned by payment method on processing | 123456 |
payment_method_id |
OptionalNullable[str] | ➖ | A unique identifier for an object. | 12345 |
account |
OptionalNullable[models.LinkedLedgerAccountInput] | ➖ | N/A | |
supplier |
OptionalNullable[models.LinkedSupplierInput] | ➖ | The supplier this entity is linked to. | |
company_id |
OptionalNullable[str] | ➖ | The company or subsidiary id the transaction belongs to | 12345 |
reconciled |
OptionalNullable[bool] | ➖ | Indicates if the transaction has been reconciled. | true |
status |
Optional[models.PaymentStatus] | ➖ | Status of payment | authorised |
type |
Optional[models.BillPaymentType] | ➖ | Type of payment | accounts_payable |
allocations |
List[models.BillPaymentAllocations] | ➖ | N/A | |
note |
OptionalNullable[str] | ➖ | Note associated with the transaction | Some notes about this transaction |
number |
OptionalNullable[str] | ➖ | Number associated with the transaction | 123456 |
tracking_categories |
List[models.LinkedTrackingCategory] | ➖ | A list of linked tracking categories. | |
custom_fields |
List[models.CustomField] | ➖ | N/A | |
row_version |
OptionalNullable[str] | ➖ | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 |
display_id |
OptionalNullable[str] | ➖ | Id to be displayed. | 123456 |
pass_through |
List[models.PassThroughBody] | ➖ | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.AccountingBillPaymentsUpdateResponse
Error Type | Status Code | Content Type |
---|---|---|
models.BadRequestResponse | 400 | application/json |
models.UnauthorizedResponse | 401 | application/json |
models.PaymentRequiredResponse | 402 | application/json |
models.NotFoundResponse | 404 | application/json |
models.UnprocessableResponse | 422 | application/json |
models.APIError | 4XX, 5XX | */* |
Delete Bill Payment
from apideck_unify import Apideck
import os
with Apideck(
api_key=os.getenv("APIDECK_API_KEY", ""),
consumer_id="test-consumer",
app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:
res = apideck.accounting.bill_payments.delete(id="<id>", service_id="salesforce")
assert res.delete_bill_payment_response is not None
# Handle response
print(res.delete_bill_payment_response)
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
id |
str | ✔️ | ID of the record you are acting upon. | |
service_id |
Optional[str] | ➖ | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce |
raw |
Optional[bool] | ➖ | Include raw response. Mostly used for debugging purposes | |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.AccountingBillPaymentsDeleteResponse
Error Type | Status Code | Content Type |
---|---|---|
models.BadRequestResponse | 400 | application/json |
models.UnauthorizedResponse | 401 | application/json |
models.PaymentRequiredResponse | 402 | application/json |
models.NotFoundResponse | 404 | application/json |
models.UnprocessableResponse | 422 | application/json |
models.APIError | 4XX, 5XX | */* |