Getting Started: Pushing Data

Overview

This guide covers the steps needed to send data from your ERP to Bushel’s platform.

All ERP data is sent to Bushel via our JSON REST API and is received by our Router service. From there, data is distributed throughout Bushel’s Platform and can be viewed in our Customer Portal, sent to Bushel Farm, and more.

Prerequisites

Before data can be sent to Bushel, you will need the following:

Authorization Token

A static token provided by Bushel that uniquely identifies your integration. Contact your Bushel representative or [email protected] for a token.

Test Environment

Bushel strives to accommodate your development and testing needs. We offer a dedicated production-like Sandbox environment for testing and have solutions for integrating with your development, validation, and production environments.

Your First Payload

In this example, we will send two Locations to Bushel using the update-elevators command.

Payload Body

Using data from your database or data store, start by mapping Location data to the update-elevators payload, referencing the Sync API documentation. Your payload should look something like the following:

{
    "data": [{
        "update-elevators": {
            "elevators": [{
                "address_line_1": "507 7th St. N",
                "address_line_2": "",
                "cash_bids_hidden": false,
                "city": "Fargo",
                "deleted_at": null,
                "email": "[email protected]",
                "fax": "",
                "id": "1",
                "name": "Bushel World Headquarters",
                "phone": "+17013690633",
                "push_notifications_hidden": false,
                "state": "ND",
                "website": "https://bushelpowered.com",
                "version": "1.0.0",
                "zip_code": "58102"
            },
            {
                "address_line_1": "4501 7th Ave N",
                "cash_bids_hidden": false,
                "city": "Fargo",
                "id": "2",
                "name": "Drop off site",
                "push_notifications_hidden": false,
                "state": "ND",
                "website": "https://bushelpowered.com",
                "version": "1.0.0",
                "zip_code": "58102"
            }]
        }
    }]
}

Note that any field which is not required may be provided as either null or simply not provided.

Sending the Request

URL

All ERP data, regardless of data type, is pushed to the /api/v1/push endpoint of the Router in your target environment. The base URL the request is made to will depend on how your test environment was configured. Options for the full URL will be:

Authorization

Authorization and Authentication is performed using the shared secret provided by Bushel when configuring the environment. It must be provided in the Authorization header.

Request Tracking

An optional, universally unique X-Request-ID header for request tracking between your integration and Bushel’s system may also be provided.

Putting it all together

Putting it all together, our request payload will look something like the following, written as a CURL request:

curl --request POST \
  --url https://router.translator.sandbox.bushelops.com/api/v1/push \
  --header 'Accept: application/json' \
  --header 'Authorization: PUT_YOUR_SECRET_AUTH_CODE_HERE' \
  --header 'Content-Type: application/json' \
  --header 'X-Request-ID: b9a759f5-21b3-4b91-85ae-caba0f880f4b' \
  --data '{
    "data": [{
        "update-elevators": {
            "elevators": [{
                "address_line_1": "507 7th St. N",
                "address_line_2": "",
                "cash_bids_hidden": false,
                "city": "Fargo",
                "deleted_at": null,
                "email": "[email protected]",
                "fax": "",
                "id": "1",
                "name": "Bushel World Headquarters",
                "phone": "+17013690633",
                "push_notifications_hidden": false,
                "state": "ND",
                "website": "https://bushelpowered.com",
                "version": "1.0.0",
                "zip_code": "58102"
            },
            {
                "address_line_1": "4501 7th Ave N",
                "cash_bids_hidden": false,
                "city": "Fargo",
                "id": "2",
                "name": "Drop off site",
                "push_notifications_hidden": false,
                "state": "ND",
                "website": "https://bushelpowered.com",
                "version": "1.0.0",
                "zip_code": "58102"
            }]
        }
    }]
}'

If successful, you will receive a HTTP 204: No Content response, indicating that Bushel has successfully received and processed your payload.

Next Steps

Now that you have successfully sent data to Bushel, you can start mapping and sending additional objects such as User Account mappings, Contracts, and more!