BoxBrownie.com

API Overview


The BoxBrownie.com V2 API is a REST API that allows you to interact with your BoxBrownie.com account programmatically. You can submit jobs, reworks, and more. On this page, we provide a brief overview of the requirements and functionality of the BoxBrownie V2 API.

For more in-depth information for specific use-cases, aswell as example code, you may refer to the items in the left navigation panel.

Account Credits

Before you begin, you must have enough credit in your BoxBrownie.com account. If you are new to BoxBrownie.com, or your balance is running low, you may purchase credits for your account via the Buy Credits page.

Authentication

BoxBrownie.com's API V2 utilises a Public/Private key-pair for the purposes of authentication and these keys must be included in the header of all requests. You can obtain a key-pair by going to the 'API Keys' section of your BoxBrownie.com account.

Once you have generated a new key-pair, be sure to note it down somewhere. Whilst your public key is stored in our servers and can be viewed by you at any time, you can only view your private key once and it WILL NOT be stored on any of our servers. Below is an example of a public/private key-pair:

  • Api-Public-Key: 07a7c2a5abab20c90ca113b56dcc06b4bf7f38ec54887a2ccfe69a5a0d1ba087
  • Api-Private-Key: 5d2c2ae1990be3741dd25ecb48b706ea3f54e6f85eee457212e8241faacfe3b4

PLEASE NOTE: If you lose your private key, you will be required to generate a new key-pair.

Check Authentication

GET /api/v2/checkAuthentication
  • Endpoint: https://www.boxbrownie.com/api/v2/checkAuthentication
  • HTTP Method: GET
  • Requires Authentication? Yes
  • Optional Parameters: (string) responseFormat [json|xml]

You may use the above endpoint to check if your public and private API key pair are able to successfully validate you. Simply request the above endpoint and provide your key pair in the header as described above.

Example Response

Below, you can see an example response for the above example API Request.

Request Headers

Below is an example request header using cURL:


curl --location --request POST 'https://www.boxbrownie.com/api/v2/job/simulatePhotoEditing' \
--header 'Api-Public-Key: 07a7c2a5abab20c90ca113b56dcc06b4bf7f38ec54887a2ccfe69a5a0d1ba087' \
--header 'Api-Private-Key: 5d2c2ae1990be3741dd25ecb48b706ea3f54e6f85eee457212e8241faacfe3b4' \
				

Request Methods and Formats

BoxBrownie.com's API V2 primarily uses the GET and POST methods.

  • All requests should be made using https://.
  • GET retrieves a representation of the resource at the specified URI. The body of the response message contains the details of the requested resource.
  • POST creates a new resource at the specified URI. The body of the request message provides the details of the new resource.
    • All POST request variables/data must be encoded via multipart/form-data

Here is a sample job creation request, complete with a payload using cURL:


curl --location --request POST 'https://www.boxbrownie.com/api/v2/job/createPhotoEditing' \
--header 'Api-Public-Key: 07a7c2a5abab20c90ca113b56dcc06b4bf7f38ec54887a2ccfe69a5a0d1ba087' \
--header 'Api-Private-Key: 5d2c2ae1990be3741dd25ecb48b706ea3f54e6f85eee457212e8241faacfe3b4' \
--form 'xml="\<?xml version=\"1.0\"\?>
    <job>
        <jobTitle>My Test Job</jobTitle>
        <fileGroup>
            <files>
                <fileURL>https://picsum.photos/200/300.jpg</fileURL>
                <fileURL>https://picsum.photos/200/300.jpg</fileURL>
                <fileURL>https://picsum.photos/200/300.jpg</fileURL>
            </files>
            <photoEditingTypes>
                <photoEditingType>
                    <editName>IMAGE_ENHANCEMENT_REAL_ESTATE</editName>
                </photoEditingType>
            </photoEditingTypes>
        </fileGroup>
    </job>"'				

Response Formats

The V2 API supports responses in both XML and JSON formats. By default, all responses are generated using JSON, however, we provide an optional responseFormat parameter; simply pass responseFormat=xml to have your responses returned in XML format

Below, you can see an example response for creating a simple Photo Editing job in both XML and JSON formats:

Dates and Times

All dates and time in the API are formatted according to ISO 8601 and will be returned in your local time zone.

Have a Question?

If you have any questions or require any support, send us an email. We're always happy to help and will aim to respond in a timely manner!