Bulk - Uploading an Aggregate XML Job Feed to Snagajob

This resource contains integration instructions for vendors interested in uploading an Aggregate (group of multiple employers) XML Job Feed file directly to Snagajob.

Aggregate XML feed examples and element descriptions

Please refer to the Aggregate Job Feed Elements page for details on supported XML elements and requirements.

See: Aggregate Feed XML Example

Aggregate Feed File Upload Process

To ensure authenticity, Snagajob requires that you generate a signature and provide it within the header of your requests. (X-SAJ-Signature)

See: Generating the X-SAJ-Signature

  1. Obtain a pre-signed URL by calling our public API route. ( Request to obtain the pre-signed information)

  2. Upload your feed file to our S3 bucket using our example format. ( Request to upload your XML job feed)

Request to obtain the pre-signed information

Create a request to our API to receive the signed S3 bucket URL. A presigned upload URL will be returned.

post
Header parameters
X-SAJ-PartnerstringOptional

A key provided by Snagajob that represents the partner. Required.

X-SAJ-DatestringRequired

The date and time of the request in the RFC1123 format (eg: Mon, 31 Oct 2022 20:23:10 GMT). Dates older then 15 minutes will be rejected.

X-SAJ-SignaturestringRequired

A string specific to the request and signed with a private key as described https://docs.snagajob.com/authentication/generating-the-x-saj-signature".

Responses
200

OK

post
POST /v1/presigned-s3-bulk-posting-post HTTP/1.1
Host: 
X-SAJ-Date: text
X-SAJ-Signature: text
Accept: */*
200

OK

{
  "url": "https://example.com",
  "fileUrl": "https://example.com",
  "fields": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

Example Request

curl 'https://developers.snagajob.com/api/v1/presigned-s3-bulk-posting-post' \
    -X POST	
    -H 'X-SAJ-Partner: ThePartnerName' \
    -H 'X-SAJ-Signature: <base64 encoded signature>' \
    -H 'X-SAJ-Date:  Mon, 31 Oct 2022 20:23:10 GMT'

Example Response

{
   "fields" : {
      "key" : "some_path/to_a_file/PP_8675309_20220413190807.xml",
      "policy" : "<policy-value>",
      "success_action_status" : "201",
      "x-amz-algorithm" : "AWS4-HMAC-SHA256",
      "x-amz-credential" : "AKIAIOSFODNN7EXAMPLE/20151229/us-east-1/s3/aws4_request",
      "x-amz-date" : "20220420T000000Z",
      "x-amz-security-token" : "<security-token>",
      "x-amz-signature" : "<signature-value>"
   },
   "fileUrl" : "https://examplebucket.s3.amazonaws.com/some_path/to_a_file/PP_8675309_20220420190807.xml",
   "url" : "https://examplebucket.s3.amazonaws.com"
}

Request to upload your XML job feed

The above response has all the necessary information to upload your XML job feed directly to a Snagajob S3 bucket.

Example Request

curl 'https://examplebucket.s3.amazonaws.com' \
    -F policy=<policy-value> \
    -F success_action_status=201 \
    -F key=some_path/to_a_file/PP_8675309_20220420190807.xml \
    -F x-amz-algorithm=AWS4-HMAC-SHA256 \
    -F x-amz-credential=AKIAIOSFODNN7EXAMPLE/20151229/us-east-1/s3/aws4_request \
    -F x-amz-signature=<signature-value> \
    -F x-amz-security-token=<security-token> \
    -F x-amz-date=20220420T000000Z \
    -F file=@the_file_you_would_like_to_upload.xml

Last updated

Was this helpful?