Public API Documentation for People and Group Data Uploads to Package Zen
Depending on whether you are testing or in production, you should use the correct ROOT_URL:
- Development: https://staging.packagezen.com
- Production: https://api.packagezen.com
In order to allow for different file types, the API endpoint uses the multipart Content Type (Content-Type: multipart/form-data;
). Please make sure to follow this protocol when you are uploading your file.
In order to identify which organization to associate your upload with, we require the X-Org-Token header. In addition, in order for us to know which API version you are pointing to, you will need to pass the Accept header.
X-Org-Token
(This will be provided to you by the Package Zen team)Accept application/vnd.packagezen.v1
All you need to pass to use is the file that you are uploading, withe the mentioned name:
uploaded_file
(This is where your data file will reside. Please make sure that it is valid JSON within the file.)
Depending on which data you are uploading, you should use one of these endpoint respectively.
POST /api/organizations/upload_groups
POST /api/organizations/upload_people
Upon successful upload, we issue a status code of 200 with a JSON payload of:
{message: 'Saved successfully'}
If any errors occur, then we will reply with a 400-499 error code depending on the error reason, with a JSON Payload of:
{error: "Your JSON could not be parsed."}
curl
-H 'Accept: application/vnd.packagezen.v1'
-H 'X-Org-Token: you_organization_token'
-F uploaded_file=@john_smith.json
--verbose http://staging.packagezen.com/api/organizations/upload_people