Accounts Payable

Monitor this page to keep up with the Accounts Payable API latest changes and SKY API service releases.

2018-06-12

Announcement: Changes for Accounts Payable API

We implemented new operation ID values in the OpenApi (fka Swagger) definitions for all endpoints in the Accounts Payable API. Note that any existing code relying on these endpoints will continue to function, since all routes and parameters are unchanged. However, if you make use of client-side generated code and want to regenerate your client wrapper, compile-time errors in your code stemming from new operation ID values will arise and need to be addressed.

2018-06-04

Announcement: Changes Planned for Accounts Payable, General Ledger, and Treasury (Beta) APIs

We will implement new operation ID values in the OpenApi (fka Swagger) definitions for several SKY APIs. This change will improve client-side tooling support for code generation by making these values more deterministic and friendlier across different languages. Going forward, we expect high stability of these values (meaning, we won’t need to change them again).

Note that any existing code that has been deployed will continue to function with no problems, since we are not changing any routes or parameters. If you make use of client-side generated code and want to regenerate your client wrapper, you’ll need to fix any compile-time errors in your code stemming from new method names.

2018-06-01

New

Added the following endpoint:

Operation Method Route
Invoice edit PATCH /invoices/{invoice_id}

With the new endpoint, note the following:

  • You can edit the following properties of an existing invoice:
    • vendor_id
    • vendor_name
    • invoice_number
    • invoice_date
    • due_date
    • description
    • status
    • invoice_payment_details
    • post_status
    • post_date
    • distribution_discounts
    • distributions
    • custom_fields
  • You cannot edit Posted or Paid invoices.
  • You cannot update an invoice to change the status to Posted, Paid, or Partially Paid.
  • If you omit fields from PATCH requests, the endpoint does not edit them with default values. For example, the following code sample only edits the description property.
    {
          “description”: "edited description"
    }
    

April

2018-04-20

Changed

We made several changes to the Invoice attachment endpoint:

  • The endpoint now supports Physical attachments (previously only supported Link attachments)
  • Note the shape of the request in JSON form:

    
    {
    "parent_id": 0,
    "name": "string",
    "url": "string",
    "type": "Link",
    "media_type": "string",
    "file": {
      "ContentLength": 0,
      "ContentType": "string",
      "FileName": "string",
      "InputStream": {
        "CanRead": true,
        "CanSeek": true,
        "CanTimeout": true,
        "CanWrite": true,
        "Length": 0,
        "Position": 0,
        "ReadTimeout": 0,
        "WriteTimeout": 0
        }
     }
    }
    
    • The type field now accepts Physical (defaults to Link if not provided)
    • A url is not required for Physical attachments
    • A file must be provided for Physical attachments
    • A url must be provided for Link attachments
    • The new file field is HttpPostedFileBase
  • The request must be a multipart/form-data request. For example,


public static Task PostMultiPartDataFormAsync(this HttpClient client, string route, Attachment content)
        {
            var httpContent = new MultipartFormDataContent();
            var streamContent = new StreamContent(content.File.InputStream);
            var ContentDisposition = new ContentDispositionHeaderValue("form-data");
            ContentDisposition.Name = "File";
            ContentDisposition.FileName = content.File.FileName;
            streamContent.Headers.ContentDisposition = ContentDisposition;
            streamContent.Headers.ContentType = new MediaTypeHeaderValue(content.File.ContentType);
            httpContent.Add(streamContent);
            httpContent.Add(new StringContent(content.ParentId.ToString()), "ParentId");
            httpContent.Add(new StringContent(content.Name), "Name");
            httpContent.Add(new StringContent(content.Type.ToString()), "Type");
            httpContent.Add(new StringContent(content.MediaType.ToString()), "MediaType");

            var request = new HttpRequestMessage(HttpMethod.Post, route)
            {
                Content = httpContent
            };
            return SendAsync(client, request);
        }

  • JSON requests for url attachments will work the same as they did prior to this release
  • JSON requests containing files will fail or ignore the file if type is set to link
  • JSON request field names need to use snake casing, such as parent_id and media_type whereas multipart/form-data requests need to use camel case, such as ParentId and MediaType

March

2018-03-30

Changed

For the Invoice (List) endpoint, we made the following changes:

  • The payment_method of the invoice is now returned in the listed objects, which includes EFT, Credit card, Bank draft, or Check.
  • The payment_method field can also be filtered during search.

January

2018-01-17

Changed

For the Invoice (List) endpoint, we added the delete, paid, and partially paid statuses.

2017

2017-11-17

Changed

Added additional fields to the following endpoint:

Operation Method Route
Payment term (list) GET /paymentterms

2017-10-12

New

Added the following endpoint:

Operation Method Route
Payment term (list) GET /paymentterms

2017-09-28

Changed

For the following endpoint, we added the payment_default field which includes credit limit, payment terms, and bank account information:

Operation Method Route
Vendors GET /vendors

2017-06-30

New

Added the following endpoints:

Operation Method Route
Invoice attachment POST /invoices/attachments
Media type (List) GET /mediatypes

2017-05-05

New

Added the following endpoints:

Operation Method Route
Invoice 1099 amount GET /invoices/{invoice_id}/1099amount
Invoice 1099 box numbers GET /invoices/{invoice_id}/1099boxnumber

2016

2016-12-06

New

  • Added the following endpoints:
Operation Method Route
Invoice custom field (List) GET /invoices/customfields
Vendor custom field (List) GET /vendors/customfields
  • Added new custom field entities to the following endpoints:
Operation Method Route
Invoice POST /invoices
Invoice GET /invoices/{invoice_id}
Vendor POST /vendors
Vendor GET /vendors/{vendor_id}

Changed

For consistency across APIs, all responses to GET endpoints that return collections now return an object with "count" and "value" properties. The following endpoints are affected:

Operation Method Route
Address (List) GET /vendors/{vendor_id}/addresses
Contact method (List) GET /vendors/{vendor_id}/addresses/{address_id}/contactmethods
Note (List) GET /vendors/{vendor_id}/notes

2016-11-14

Announcement: Breaking Changes Planned for Accounts Payable API

For consistency across APIs, we will implement the following change:

All responses to GET endpoints that return collections will return an object with "count" and "value" properties. The following endpoints are affected:

Operation Method Route
Address (List) GET /vendors/{vendor_id}/addresses
Contact method (List) GET /vendors/{vendor_id}/addresses/{address_id}/contactmethods
Note (List) GET /vendors/{vendor_id}/notes

2016-10-12

Changed

For consistency across APIs, we implemented the following changes:

  • All responses to POST requests changed from "RecordId" to "record_id".
  • The following endpoints and their associated fields changed from CamelCase to snake_case:
Operation Method Route
Invoice GET /invoice
Invoice POST /invoice

2016-10-04

Announcement: Breaking Changes Planned for Accounts Payable API

For consistency across APIs, we will implement the following changes:

  • All responses to POST requests will change from "RecordId" to "record_id".
  • The following endpoints and their associated fields will change from CamelCase to snake_case:
Operation Method Route
Invoice GET /invoice
Invoice POST /invoice

2016-08-12

Breaking Change

We changed the default and maximum record limits on the following search and list endpoints. The default is now 100 records, and the maximum is 500 records.

Operation Method Route
Vendor (List) GET /vendors
Invoice (List) GET /invoices

2016-08-04

New

The Accounts Payable API is now available. Use this API to manage accounts payable, including vendors and invoices.