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.
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.
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:
07a7c2a5abab20c90ca113b56dcc06b4bf7f38ec54887a2ccfe69a5a0d1ba087
5d2c2ae1990be3741dd25ecb48b706ea3f54e6f85eee457212e8241faacfe3b4
PLEASE NOTE: If you lose your private key, you will be required to generate a new key-pair.
https://www.boxbrownie.com/api/v2/checkAuthentication
GET
Yes
(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.
Below, you can see an example response for the above example API Request.
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' \
BoxBrownie.com's API V2 primarily uses the GET
and POST
methods.
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.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>"'
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:
All dates and time in the API are formatted according to ISO 8601 and will be returned in your local time zone.
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!