Skip to main content

POST Data to Slate

Posting to a Source Format

Define a Source Format within Slate, then click the Web Services link to view the endpoint URL. Authentication can be basic or certificate-based. The username and password are not specific to the source format but instead belong to a Slate user account, typically a service user.

View Source Format Web Service

<layout type="json" node="/row">
  <f id="Application GUID" s="aid" />
  <f id="Record Found" s="found" />
  <f id="Registered" s="registered" />
  <f id="Registered Date" s="reg_date" />
  <f id="Withdrawn" s="withdrawn" />
  <f id="Registered Credits" s="credits" />
</layout>

The source format needs an XML definition (XPath syntax) that correponds to the JSON body you will send. Example:

A matching JSON request body:

{
    "row": [
        {
            "found": true,
            "registered": false,
            "withdrawn": false,
            "credits": "0.00",
            "aid": "0d6d5e78-f89a-4a93-98e1-058aecd5fe93"
        },
        {
            "found": true,
            "registered": true,
            "reg_date": "2021-04-07",
            "withdrawn": false,
            "credits": "12.00",
            "aid": "0425e15a-6c55-4c3c-9e83-d9b9d40cbacf"
        }
    ]
}

As usual with Source Formats in Slate, you must click **Remap** and define mappings between your external source columns and internal destinations.

Posting to a Portal

See Portal POST methods.

Posting from Zapier

Zapier Webhooks present a challenge in that they do not nest request data by default (which is required). The simplest workaround is to enable Unflatten and prefix your data fields with your root element name and two underscores. For example, title could become row__title.

image.png

The above example produces this JSON:

{
    "row": {
        "desc": "Microsoft took the unusual step on Monday of publicly criticizing longtime rival Google for running \"shadow campaigns\" in Europe designed to discredit the software giant with regulators. CNBC: Microsoft lawyer Rima Alaily wrote in a blog post...",
        "title": "Microsoft Calls Out Google For Running 'Shadow Campaigns' in Europe To Influence Regulators"
    }
}