Sage Accounting Component
Manage contacts and others connected to your Sage account.
Component key: sage
Description
Sage is software for managing your small business's accounting. This component allows you to generate and track invoices, manage accounts, contacts and more.
Connections
OAuth 2.0
You will first need to create and configure a Connected App within Sage Accounting.
Be sure to enter the OAuth callback URL - https://oauth2.prismatic.io/callback - as a Callback URL.
Select Require Secret for Web Server Flow and Require Secret for Refresh Token Flow:
Once the app has been created, you will be provided with a Client Id and Client Secret.
Create a new connection for the Sage component and use the following values:
- For Client ID and Client Secret enter the values that you received previously.
- For Scopes enter either
full_accessorreadonly. Sage Authentication Documentation
| Input | Notes | Example |
|---|---|---|
| Authorize URL | The OAuth 2.0 Authorization URL for Sage | https://www.sageone.com/oauth2/auth/central?filter=apiv3.1 |
| Client ID | Client Identifier of your app for Sage | |
| Client Secret | Client Secret of your app for Sage | |
| Scopes | Space separated OAuth 2.0 permission scopes for Sage | full_access |
| Token URL | The OAuth 2.0 Token URL for Sage | https://oauth.accounting.sage.com/token |
Actions
Create Contact
Create a new contact | key: createContact
| Input | Notes | Example |
|---|---|---|
| Account Name | Provide a string value for the name of the bank account. | Example Account |
| Account Number | Provide a valid bank account number. | Example Account No |
| Address Line 1 | Provide a valid street address | 4 Privet Drive |
| Address Line 2 | Provide a string value for the 2nd address line. | apt 319 |
| Address Name | Provide a string value for a name. | Example Name |
| Address Type Id | Provide a unique identifier for the address type | 90211 |
| Bank Account Id | Provide a value for the postal code. | example-9489210 |
| BIC | Provide a valid BIC for the bank account. | BOFA |
| City | Provide a string value for the city of the address. | Beverly Hills |
| Connection | ||
| Contact Type Ids | For each list item, provide an Id of a contact type | example-2356795 |
| Country Id | Provide a unique identifier for the contact's country. | |
| Credit Days | Provide a number value for the credit days of the contact. | 10 |
| Credit Limit | Provide a number value for the credit limit of the contact. | 350.00 |
| Currency Id | Provide the unique identifier of the currency type. | example-24525235 |
| Default Purchase Ledger Id | Provide the unique identifier of the default purchase ledger for the contact. | example-80430964 |
| Default Sales Ledger Id | Provide the unique identifier of the default sales ledger. | example-80430964 |
| Default Sales Tax Rate Id | Provide the unique identifier of the sales tax rate for the contact. | example-80430964 |
| Delivery Address Bank Account Id | Provide a value for the postal code. | example-9489210 |
| Delivery Address City | Provide a string value for the city of the address. | Beverly Hills |
| Delivery Address Country Id | Provide a unique identifier for the contact's country. | |
| Delivery Address Line 1 | Provide a valid street address | 4 Privet Drive |
| Delivery Address Line 2 | Provide a string value for the 2nd address line. | apt 319 |
| Delivery Address Name | Provide a string value for a name. | Example Name |
| Delivery Address Postal Code | Provide a value for the postal code. | 90211 |
| Delivery Address Region | Provide a valid region for the contact. | North America |
| Delivery Address Type Id | Provide a unique identifier for the address type | 90211 |
| IBAN | Provide a valid IBAN for the bank account. | CY 17 002 00128 00000012005276002 |
| Is Main Address | This flag will determine if this is the contacts main address. | false |
| Is Main Address | This flag will determine if this is the contacts main address. | false |
| Name | Provide a string value for a name. | Example Name |
| Notes | Provide a string value for notes. | This is an example note. |
| Postal Code | Provide a value for the postal code. | 90211 |
| Reference | Provide a string value for the reference of the contact. | uniqueValue |
| Region | Provide a valid region for the contact. | North America |
| Sort Code | Provide a sort code for the bank account. | 12-34-56 |
| Source GUID | Provide a valid GUID, used for importing/exporting contacts from 3rd party services. | example-80430964 |
| Tax Number | Provide a string value for the VAT registration number for the contact. | 80430964 |
{
"data": {
"results": {
"id": "example-80745034",
"displayed_as": "Example Contact",
"$path": "/contacts/example",
"created_at": "2022-01-03T18:00:57Z",
"updated_at": "2022-01-03T18:00:57Z",
"links": [
{
"href": "https://accounting.na.sageone.com/contacts/customers/example",
"rel": "alternative",
"type": "text/html"
}
],
"contact_types": [
{
"id": "CUSTOMER",
"displayd_as": "Customer"
}
],
"name": "exampleName",
"reference": null,
"default_sales_ledger_account": {
"id": "example",
"displayed_as": "Professional Fees"
}
}
}
}
Create Ledger Account
Create a new Ledger account | key: createLedgerAccount
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Display Name | Provide a string value for the display name. | Example Name |
| Include In Chart | This flag determines if the account will be included in the chart of accounts. | true |
| Ledger Account Type Id | Provide the unique identifier of a ledger account type. | example-2356795 |
| Name | Provide a string value for a name. | Example Name |
| Nominal Code | Provide an unique integer value for the nominal code of the ledger account. | 1 |
| Tax Rate Id | Provide the unique identifier of a tax rate id. | example-238953e2 |
Create Purchase Invoice
Create a new purchase invoice | key: createPurchaseInvoice
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Contact Id | Provide the unique identifier of a contact. | example-533242 |
| Date | Provide a valid date value. | 2022-01-03 |
| Due Date | Provide a valid date value for the due date of the invoice. | 2022-01-03 |
| Invoice Lines | Provide a list of javascript objects, each containing information of an an invoice line item. | |
| Total Amount | Provide a total amount for the invoice. | 150.00 |
Create Sales Invoice
Create a new sales invoice | key: createSalesInvoice
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Contact Id | Provide the unique identifier of a contact. | example-533242 |
| Date | Provide a valid date value. | 2022-01-03 |
| Invoice Lines | Provide a list of javascript objects, each containing information of an an invoice line item. | |
| Total Amount | Provide a total amount for the invoice. | 150.00 |
Delete Contact
Delete an existing contact by Id | key: deleteContact
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Contact Id | Provide the unique identifier of a contact. | example-533242 |
Delete Contact Person
Delete an existing contact person by Id | key: deleteContactPerson
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Contact Person Id | Provide the unique identifier of a contact person. | example-533242 |
Delete Purchase Invoice
Delete the information and metadata of a purchase invoice by Id | key: deletePurchaseInvoice
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Purchase Invoice Id | Provide the unique identifier of a purchase invoice id. | example-533242 |
Delete Sales Invoice
Delete the information and metadata of a sales invoice by Id | key: deleteSalesInvoice
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Sales Invoice Id | Provide the unique identifier of a sales invoice id. | example-533242 |
Get Contact
Get the information and metadata of a contact by Id | key: getContact
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Contact Id | Provide the unique identifier of a contact. | example-533242 |
Get Contact Person
Get the information and metadata of a contact person by Id | key: getContactPerson
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Contact Person Id | Provide the unique identifier of a contact person. | example-533242 |
Get Ledger Account
Get the information and metadata of a Ledger account | key: getLedgerAccount
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Ledger Account Id | Provide the unique identifier of a ledger account. | example-2356795 |
Get Purchase Invoice
Get the information and metadata of a purchase invoice by Id | key: getPurchaseInvoice
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Purchase Invoice Id | Provide the unique identifier of a purchase invoice id. | example-533242 |
Get Sales Invoice
Get the information and metadata of a sales invoice by Id | key: getSalesInvoice
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Sales Invoice Id | Provide the unique identifier of a sales invoice id. | example-533242 |
List Address Types
List all address types | key: listAddressTypes
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Items Per Page | Provide a value for the amount of items to be returned in the response. | 100 |
| Page | Provide a value for the page of results you would like to be returned. | 1 |
List Contact People
List all contact people | key: listContactPeople
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Items Per Page | Provide a value for the amount of items to be returned in the response. | 100 |
| Page | Provide a value for the page of results you would like to be returned. | 1 |
| Update or Created Since | Use this to limit the response to Contacts changed since a given date (format: YYYY-MM-DDT(+|-)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+|-)hh:mm). Inclusive of the passed timestamp. | 2015-10-27T16:24:52Z |
List Contact Types
List all contact types | key: listContactTypes
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Items Per Page | Provide a value for the amount of items to be returned in the response. | 100 |
| Page | Provide a value for the page of results you would like to be returned. | 1 |
List Contacts
List all contacts | key: listContacts
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Items Per Page | Provide a value for the amount of items to be returned in the response. | 100 |
| Page | Provide a value for the page of results you would like to be returned. | 1 |
| Update or Created Since | Use this to limit the response to Contacts changed since a given date (format: YYYY-MM-DDT(+|-)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+|-)hh:mm). Inclusive of the passed timestamp. | 2015-10-27T16:24:52Z |
List Countries
List all countries | key: listCountries
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Items Per Page | Provide a value for the amount of items to be returned in the response. | 100 |
| Page | Provide a value for the page of results you would like to be returned. | 1 |
List Currencies
List all currencies | key: listCurrencies
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Items Per Page | Provide a value for the amount of items to be returned in the response. | 100 |
| Page | Provide a value for the page of results you would like to be returned. | 1 |
List Ledger Account Types
List all Ledger account types | key: listLedgerAccountTypes
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Items Per Page | Provide a value for the amount of items to be returned in the response. | 100 |
| Page | Provide a value for the page of results you would like to be returned. | 1 |
List Ledger Accounts
List all Ledger accounts | key: listLedgerAccounts
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Items Per Page | Provide a value for the amount of items to be returned in the response. | 100 |
| Page | Provide a value for the page of results you would like to be returned. | 1 |
| Update or Created Since | Use this to limit the response to Contacts changed since a given date (format: YYYY-MM-DDT(+|-)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+|-)hh:mm). Inclusive of the passed timestamp. | 2015-10-27T16:24:52Z |
List Purchase Invoices
List all purchase invoices | key: listPurchaseInvoice
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Items Per Page | Provide a value for the amount of items to be returned in the response. | 100 |
| Page | Provide a value for the page of results you would like to be returned. | 1 |
| Update or Created Since | Use this to limit the response to Contacts changed since a given date (format: YYYY-MM-DDT(+|-)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+|-)hh:mm). Inclusive of the passed timestamp. | 2015-10-27T16:24:52Z |
List Sales Invoices
List all sales invoices | key: listSalesInvoices
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Items Per Page | Provide a value for the amount of items to be returned in the response. | 100 |
| Page | Provide a value for the page of results you would like to be returned. | 1 |
| Update or Created Since | Use this to limit the response to Contacts changed since a given date (format: YYYY-MM-DDT(+|-)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+|-)hh:mm). Inclusive of the passed timestamp. | 2015-10-27T16:24:52Z |
Raw Request
Send raw HTTP request to Sage Accounting | key: rawRequest
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} |
| Debug Request | Enabling this flag will log out the current request. | false |
| File Data | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] |
| File Data File Names | File names to apply to the file data inputs. Keys must match the file data keys above. | |
| Form Data | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] |
| Header | A list of headers to send with the request. | User-Agent: curl/7.64.1 |
| Max Retry Count | The maximum number of retries to attempt. Specify 0 for no retries. | 0 |
| Method | The HTTP method to use. | |
| Query Parameter | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | |
| Response Type | The type of data you expect in the response. You can request json, text, or binary data. | json |
| Retry On All Errors | If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors. | false |
| Retry Delay (ms) | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | 0 |
| Timeout | The maximum time that a client will await a response to its request | 2000 |
| URL | Input the path only (/contacts), The base URL is already included (https://api.accounting.sage.com/v3.1). For example, to connect to https://api.accounting.sage.com/v3.1/contacts, only /contacts is entered in this field. | /contacts |
| Use Exponential Backoff | Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. | false |
Update Contact
Update the information and metadata of an existing contact by Id | key: updateContact
| Input | Notes | Example |
|---|---|---|
| Account Name | Provide a string value for the name of the bank account. | Example Account |
| Account Number | Provide a valid bank account number. | Example Account No |
| Address Line 1 | Provide a valid street address | 4 Privet Drive |
| Address Line 2 | Provide a string value for the 2nd address line. | apt 319 |
| Address Name | Provide a string value for a name. | Example Name |
| Address Type Id | Provide a unique identifier for the address type | 90211 |
| Bank Account Id | Provide a value for the postal code. | example-9489210 |
| BIC | Provide a valid BIC for the bank account. | BOFA |
| City | Provide a string value for the city of the address. | Beverly Hills |
| Connection | ||
| Contact Id | Provide the unique identifier of a contact. | example-533242 |
| Contact Type Ids | For each list item, provide an Id of a contact type | example-2356795 |
| Country Id | Provide a unique identifier for the contact's country. | |
| Credit Days | Provide a number value for the credit days of the contact. | 10 |
| Credit Limit | Provide a number value for the credit limit of the contact. | 350.00 |
| Currency Id | Provide the unique identifier of the currency type. | example-24525235 |
| Default Purchase Ledger Id | Provide the unique identifier of the default purchase ledger for the contact. | example-80430964 |
| Default Sales Ledger Id | Provide the unique identifier of the default sales ledger. | example-80430964 |
| Default Sales Tax Rate Id | Provide the unique identifier of the sales tax rate for the contact. | example-80430964 |
| Delivery Address Bank Account Id | Provide a value for the postal code. | example-9489210 |
| Delivery Address City | Provide a string value for the city of the address. | Beverly Hills |
| Delivery Address Country Id | Provide a unique identifier for the contact's country. | |
| Delivery Address Line 1 | Provide a valid street address | 4 Privet Drive |
| Delivery Address Line 2 | Provide a string value for the 2nd address line. | apt 319 |
| Delivery Address Name | Provide a string value for a name. | Example Name |
| Delivery Address Postal Code | Provide a value for the postal code. | 90211 |
| Delivery Address Region | Provide a valid region for the contact. | North America |
| Delivery Address Type Id | Provide a unique identifier for the address type | 90211 |
| IBAN | Provide a valid IBAN for the bank account. | CY 17 002 00128 00000012005276002 |
| Is Main Address | This flag will determine if this is the contacts main address. | false |
| Is Main Address | This flag will determine if this is the contacts main address. | false |
| Name | Provide a string value for a name. | Example Name |
| Notes | Provide a string value for notes. | This is an example note. |
| Postal Code | Provide a value for the postal code. | 90211 |
| Reference | Provide a string value for the reference of the contact. | uniqueValue |
| Region | Provide a valid region for the contact. | North America |
| Sort Code | Provide a sort code for the bank account. | 12-34-56 |
| Source GUID | Provide a valid GUID, used for importing/exporting contacts from 3rd party services. | example-80430964 |
| Tax Number | Provide a string value for the VAT registration number for the contact. | 80430964 |
{
"data": {
"results": {
"id": "example-80745034",
"displayed_as": "Example Contact",
"$path": "/contacts/example",
"created_at": "2022-01-03T18:00:57Z",
"updated_at": "2022-01-03T18:00:57Z",
"links": [
{
"href": "https://accounting.na.sageone.com/contacts/customers/example",
"rel": "alternative",
"type": "text/html"
}
],
"contact_types": [
{
"id": "CUSTOMER",
"displayd_as": "Customer"
}
],
"name": "exampleName",
"reference": null,
"default_sales_ledger_account": {
"id": "example",
"displayed_as": "Professional Fees"
}
}
}
}
Update Ledger Account
Update the information and metadata of a Ledger account by Id | key: updateLedgerAccount
| Input | Notes | Example |
|---|---|---|
| Account Id | Provide the unique identifier of the account Id. | example-2356795 |
| Connection | ||
| Display Name | Provide a string value for the display name. | Example Name |
| Gifi Code | Provide a value for The General Index of Financial Information. | NA |
| Include In Chart | This flag determines if the account will be included in the chart of accounts. | true |
| Ledger Account Type Id | Provide the unique identifier of a ledger account type. | example-2356795 |
| Name | Provide a string value for a name. | Example Name |
| Nominal Code | Provide an unique integer value for the nominal code of the ledger account. | 1 |
| Tax Rate Id | Provide the unique identifier of a tax rate id. | example-238953e2 |
Update Purchase Invoice
Update the information and metadata of a purchase invoice by Id | key: updatePurchaseInvoice
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Contact Id | Provide the unique identifier of a contact. | example-533242 |
| Contact Name | Provide the name of a contact. | John Doe |
| Currency Id | Provide the unique identifier of the currency type. | example-24525235 |
| Date | Provide a valid date value. | 2022-01-03 |
| Due Date | Provide a valid date value for the due date of the invoice. | 2022-01-03 |
| Invoice Lines | Provide a list of javascript objects, each containing information of an an invoice line item. | |
| Net Amount | Provide the net amount of the invoice. | 150.00 |
| Notes | Provide a string value for notes. | This is an example note. |
| Purchase Invoice Id | Provide the unique identifier of a purchase invoice id. | example-533242 |
| Tax Amount | Provide a tax amount for the invoice. | 150.00 |
| Total Amount | Provide a total amount for the invoice. | 150.00 |
| Total Quantity | Provide a total quantity of the invoice. | 3 |
Update Sales Invoice
Update the information and metadata of a sales invoice by Id | key: updateSalesInvoice
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Contact Id | Provide the unique identifier of a contact. | example-533242 |
| Contact Name | Provide the name of a contact. | John Doe |
| Currency Id | Provide the unique identifier of the currency type. | example-24525235 |
| Date | Provide a valid date value. | 2022-01-03 |
| Due Date | Provide a valid date value for the due date of the invoice. | 2022-01-03 |
| Invoice Lines | Provide a list of javascript objects, each containing information of an an invoice line item. | |
| Net Amount | Provide the net amount of the invoice. | 150.00 |
| Notes | Provide a string value for notes. | This is an example note. |
| Sales Invoice Id | Provide the unique identifier of a sales invoice id. | example-533242 |
| Tax Amount | Provide a tax amount for the invoice. | 150.00 |
| Total Amount | Provide a total amount for the invoice. | 150.00 |
| Total Quantity | Provide a total quantity of the invoice. | 3 |