# Single - Uploading an XML Job Feed to Snagajob

## **XML feed examples**

{% hint style="info" %}
Please refer to the [XML Feed Reference](/posting-creation/xml-feed-reference.md) page for details on supported XML elements and requirements.&#x20;

See: [XML Feed Reference](/posting-creation/xml-feed-reference.md#single-customer-feed-xml-example)
{% endhint %}

## **File Upload Process**

{% hint style="info" %}
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](/authentication/generating-the-x-saj-signature.md)
{% endhint %}

1. Obtain a pre-signed URL by calling our public API route. ( [#request-to-obtain-the-pre-signed-information](#request-to-obtain-the-pre-signed-information "mention"))
2. Upload your feed file to our S3 bucket using our example format. ( [#request-to-upload-your-xml-job-feed](#request-to-upload-your-xml-job-feed "mention"))

### **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.

{% openapi src="/files/E4rMePcQFpEqRM8OIVtf" path="/v1/presigned-s3-posting-post" method="post" %}
[swagger-scrubbed.json](https://3254940525-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpcNrbWPH4rTpEFkIs4X%2Fuploads%2FrGbtDjNS1sh8A0xdQf8f%2Fswagger-scrubbed.json?alt=media\&token=338d0522-0940-4192-a803-ac2a0241087b)
{% endopenapi %}

Example Request

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

Example Response

```json
{
   "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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snagajob.com/posting-creation/single-uploading-an-xml-job-feed-to-snagajob.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
