Web Services authorizations

Why am I getting an error about an invalid Web Services authorization?

If your Web Services call, AJAX gateway call, or SDK function fails with the following error, it means your Web Services sender ID is not authorized for the target company:

                <description>Invalid Web Services Authorization</description>
                <description2>The sender ID &#039;test_sender_id&#039; is not authorized to make Web Services requests to company ID &#039;test_company_id&#039;.</description2>
                <correction>Contact the company administrator to grant Web Services authorization to this sender ID.</correction>

Ask the company administrator to review the Web Services authorizations list on the Company Configuration Security tab, and add your sender ID if it’s not present. Note that the ajax sender ID must be included in the list when the Platform Services AJAX gateway is used.

Web Services authorization list

For more information, see Web Services authorizations in the Sage Intacct product help.


How do I verify/troubleshoot my API calls?

Before doing any serious XML API work, it’s strongly recommended that you become familiar with the use of Postman and the Sage Intacct API collection for Postman. With this approach, you can easily learn to use the API, and test and verify your API calls before hard coding them. See Your First XML API Calls to get started.

Also, consider adding a flag to enable debug logging in your application/integration to help as you develop.

Even better, consider using one of the Sage Intacct SDKs, which nicely wrap the XML APIs for you:

Where can I find information about generic and/or object-specific functions?

Find the object of interest in the API documentation, then look for the functions on that page. For example, if you want to perform some action on a bill, look at the APBILL page, which includes the certified generic functions, the object-specific/legacy functions, and examples for both.

For custom objects, use the Platform Services Objects API page for functions that let you get information about fields of custom objects. You can then use this information to compose your generic function calls.

The readByQuery function lets you get unique keys (typically record numbers) for one or more main records based on a query filter. You can then supply such a key to the read function to get more information for the main record, including details about its owned and related objects.

Can I update a statistical journal entry via the API?

Yes, but be aware that the update is treated as a complete replacement of any entries. Be careful you pass every entry you want to keep so you do not clear out the whole thing, for example:

        <BATCH_TITLE>Headcount 03/31/2016</BATCH_TITLE>
                <DESCRIPTION>Headcount 03/31/2016</DESCRIPTION>

Note that GLBATCH is used for all of the types of journal entry objects, so make sure you are providing the correct RECORDNO.

What return format should I use for best results when using readByQuery and readMore?

When you usereadByQuery with the XML returnFormat, which is the recommended format for all API calls, the returned data element has attributes about how many results are available:

 <data listtype="contract" count="2" totalcount="1588" numremaining="1586" resultId="7765623331WQdg3cCoA4MAAH4trhIAAAAD5">

If you use a different return format such as JSON, this information isn’t provided - particularly the resultId.

Objects and fields

Why aren’t my ISO formatted dates working?

Dates in Sage Intacct are textual representations of a date and have no associated timezone to them. Third-party integrators that store everything in ISO 8601 format must translate the dates to the timezone the Sage Intacct tenant uses.

What field do I use for attachments?

In the Sage Intacct UI, the Attachments label indicates that you can provide supporting documents. However, in XML API calls, the corresponding field name is SUPDOCID.

Customization Services

Are the injections in my Smart Event condition correct?

If you are having trouble setting up a condition, it’s useful to verify that your injections are correct. You can modify the Smart Event to send you an email that provides the injections in the email body. For example, if your condition uses {!APBILL.VENDORNAME!}, include this in your email:

The vendor name is: {!APBILL.VENDORNAME!}

Why aren’t integration codes working for picklist fields on a standard object?

Using name/value pairs for picklist fields is not supported for custom picklists on standard objects. This capability is only supported on custom picklists for custom objects (Platform Services).

Can I use a smart event to pull data from the first line of the line item section into a field in the header section?

You can create an API Smart Event on the detail line, and the event criteria can include LINE_NO = 0 (the underlying data is 0-based even though the UI starts at line 1). The API call in the API event can look something like this:

<update_potransaction key="{!PODOCUMENTENTRY.PODOCUMENT.DOCID!}">

For more info, check out some of the Customization Services examples.

If you only need this information in the printed PDF, you can get creative with Microsoft Word merge field codes. A SET field nested in an IF statement looking for the first line does the trick. See the Microsoft documentation on merge fields for more information.

How can I restrict a record to only be created privately in an entity, instead of at the root/top level?

Check out the Prevent creating records at the top level section in the Customization Services examples.


How can I search across the Sage Intacct Developer Community group?

  1. Click the search icon (magnifying glass) in the upper right of the Sage Intacct Developers group page.

  2. On the resulting page, click Search Feeds on the left, provide the search term, then click Search Feeds, which is now on the right side:

    Web Services authorization list