Jump to content

Recommended Posts

Posted

Hi,

 

I am new to the Sage Accounting API, so started with the published OAS/Swagger spec (https://developer.sage.com/accounting/files/swagger.full.json)

 

I generated a client from this file and started working against it. I pretty quickly ran into issues in that the API doesn't match the spec, in that it includes an envelope for all paginated results. In fact, it doesn't match the documentation in this regard.

 

For example, here is a response for get all contacts:

 

{
  "$total": 1,
  "$page": 1,
  "$next": null,
  "$back": null,
  "$itemsPerPage": 20,
  "$items": [
    {
      "id": "REDACTED",
      "displayed_as": "REDACTED",
      "$path": "/contacts/REDACTED"
    }
  ]
}

 

This pagination info isn't included in any examples or documentation that I can find online, other than the screenshot on the quick start page (https://developer.sage.com/accounting/quick-start/create-your-first-request/)

 

Is there a spec document that includes the envelope? Is generating a client from the spec not supported?

 

Thanks

 

Alex

Posted

Hi Alex, thank you for your question.

The generating of a client from the swagger is not yet supported by ourselves. We are aware of integrations where this approach has worked after the swagger was amended to include the pagination information. 

Regards

Mark

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...