Redstone API
R 630-1

Redstone API Documentation

Use the Create Order API to submit standardized print and mail orders with downloadable production files. Successful sandbox responses include the generated Redstone job number; production responses confirm the client order identifier.

Last updated: July 2026 Request bodies: JSON, XML, or form-encoded data File transfer: Direct HTTP or HTTPS URLs
Protect your API key. Never expose a valid key in public repositories, client-side code, screenshots, or shared examples.
01

Quick Start

The minimum path for creating an order.

  1. Authenticate the request. Add the assigned API key to the endpoint query string.
  2. Send a JSON or XML object. Include every required core field and each field required by the selected job type.
  3. Provide remote files. Every order requires at least one downloadable data file.
  4. Use a unique order ID. An id may only be used once per authenticated company.
02

Endpoint and Authentication

Create Order uses a single authenticated POST endpoint for JSON, XML, and form-encoded requests.

Send requests to https://redstonemail.com/apis/createOrder?API=YOUR_API_KEY using POST. Your assigned API key is provided in the API query parameter and identifies the company that owns the order. JSON requests should use Content-Type: application/json; XML requests should use application/xml, text/xml, or another content type containing xml. Standard form submissions and URL-encoded POST bodies are also parsed.

Response negotiation. ?format=json or ?format=xml takes priority. Otherwise the endpoint checks the Accept header, then an XML request Content-Type; JSON is the default response.
POST https://redstonemail.com/apis/createOrder?API=YOUR_API_KEY
Orders are assigned to the authenticated company. Every order belongs to the company associated with the authenticated API key.
Lightning orders require a valid configuration. If lightning_id is submitted, the authenticated client must be enabled for Lightning and the supplied lightning_id must resolve to an existing Lightning configuration available to that client.
Keep credentials private. API keys should be stored server-side and must not be exposed in browser code, public repositories, shared screenshots, or sample requests.
03

Your First Request

A simple path from credentials to a verified sandbox order.

1
Start with sandbox credentials

Use the API key assigned for testing so your first integration request cannot release a production order.

2
Prepare your payload

Supply the required order fields and a unique id.

3
Host the required data file

Provide a direct HTTP or HTTPS URL that the Redstone server can download without an interactive login.

4
POST the request

Send JSON or XML to the Create Order endpoint with your API key in the query string.

5
Verify the response

A successful sandbox request returns HTTP 201 with the generated job number, the stored ext_id that corresponds to your submitted id, the api_test flag, and an order URL.

04

Request Fields

Unknown top-level fields are rejected. Submit only fields listed in this documentation.

Required Fields

Field Type Required Validation Description
id string Yes 1–100 characters. Letters, numbers, spaces, periods, hyphens, underscores, and slashes only. Your unique order identifier. Duplicate values are rejected within the authenticated company.
name string Yes Maximum 255 characters. Human-readable order name.
duedate string Yes YYYY-MM-DD. Cannot be earlier than the current date. Requested due date.
jobtype string Yes Letter, Post Card, Snap Pack, or Self Mailer. Determines which job-specific fields are required.
qty_est integer Yes Whole number greater than zero. Estimated production quantity.
notes string Yes May not be null or an empty string. Order instructions or production notes.
api_test boolean No true, false Requests test processing. A test-only API credential always forces test mode.

Accepted Request Shapes

Fields may be submitted at the top level or inside an Order object. The public identifier is id. The alias ext_id is accepted only when id is omitted or when both values are identical. Authentication fields named API, api, or api_key are removed from order data.

Required Fields For Given Job-Types

Job Type Field Type Required Allowed Value Description
Letter custom_envelope boolean Yes true, false States whether the letter uses a custom envelope.
Letter num_inserts integer Yes 0–6 Number of inserts included with the letter.
Post Card postcardH float Yes Greater than 0 Postcard height in inches.
Post Card postcardW float Yes Greater than 0 Postcard width in inches.
Snap Pack fold_type string Yes Half-Fold, C-Fold, or Z-Fold Required fold configuration.
Snap Pack snap_seal string Yes Pressure Seal Required sealing method.
Self Mailer fold_type string Yes Half-Fold or C-Fold Required fold configuration.
Self Mailer snap_seal string Yes Converted Required sealing method.
Fold and sealing values are exact. The values above are the only values accepted by the current Create Order service for these job types.

Optional Request Fields

Field Type Allowed Values Description
lightning_id string Existing authorized Lightning configuration ID Optional. Uses a Lightning configuration for the order. The authenticated client must be enabled for Lightning, and the supplied lightning_id must resolve to an existing Lightning configuration available to that client.
color string 1/0, 1/1, 4/0, 4/1, 4/4 Specifies the color configuration for the front and back of the printed piece. The first number represents the front side and the second number represents the back side. 1/0 = one color on the front and blank on the back; 1/1 = one color on both sides; 4/0 = full color (CMYK) on the front and blank on the back; 4/1 = full color (CMYK) on the front and one color on the back; 4/4 = full color (CMYK) on both sides.
papertype string #20, #60, #67.5 Vellum, #70, #80 Text, #80 Gloss Cover, #100 Cover, #100 Gloss Cover, #100 Gloss Book, Custom Specifies the paper type or weight for the printed piece.
envelopetype string Single Window, Double Window, Custom Specifies the envelope type for jobs that use an envelope.
bleeds boolean true, false Indicates whether artwork includes bleeds.
purls boolean true, false Enables personalized URLs.
qr_code boolean true, false Indicates QR-code processing.
streetview boolean true, false Indicates Street View processing.
response_boost boolean true, false Indicates Response Boost processing.
permit_number string Client-provided value Mail permit number.
postage_class string First Class, First Class Pre-Sort, Standard, Full Rate Postage class.
postage_type string Permit, Permit Imprint, Stamp Postage payment type.
dist_type string PMOD, Will Call, Drop Ship, Priority Direct, Co-Mingle, None Distribution method.
release_hours integer 0–168 Optional delay, in hours, before the job is released to the CSR team.
Lightning configuration validation. lightning_id is optional. When supplied, the authenticated client must be enabled for Lightning, and the referenced Lightning configuration must exist and be available to that client.
05

Remote Files

Files are downloaded and validated before the order record is created.

Use direct download URLs. The URL must resolve to a public HTTP or HTTPS host and return the file directly. Data and suppression downloads that resolve to an HTML page are rejected. Empty files and redirects to private or reserved hosts are rejected.
Type Required Allowed Extensions Description
data At least one csv, txt, tsv, xlsx, xls Primary production data. At least one data file is required for every order.
suppression No csv, txt, tsv, xlsx, xls Optional suppression data.
art No pdf, jpg, jpeg, png, tif, tiff, zip Optional artwork or artwork package.
HTTP and HTTPS only. File URLs must use http:// or https://. Embedded URL credentials, local hosts, and private or reserved network destinations are rejected.
Remote files must remain downloadable. Direct file URLs must be reachable by Redstone's server without browser cookies, an interactive login, or other manual authentication. Keep the URL available long enough for the API to retrieve and validate the file during order creation. The current maximum remote file size is 1 GB per file.

File Rules

  • Only complete http:// and https:// URLs are accepted.
  • Each URL may be no longer than 2,048 characters.
  • Credentials may not be embedded in the URL.
  • The hostname must resolve and may not point to localhost, a .local host, or a private/reserved address.
  • Redirects are followed up to three times and the final destination is validated again.
  • Each file must return an HTTP status from 200 through 299.
  • Each file must be non-empty and no larger than 1 GB.
  • The URL path must provide a filename with one of the supported extensions shown above.
  • Connection timeout is 15 seconds; total download timeout is 120 seconds.
  • Data and suppression file MIME types are checked, but their column/header structure is not validated by this endpoint.

File Payload Formats

Submit direct file fields as a single URL or an array of URLs. Alternatively, use the files array with type and url in each entry. Each type must be exactly data, suppression, or art. Both forms may be used in one request.

Alternative files array
{
    "files": [
        {
            "type": "data",
            "url": "https://files.example.com/orders/10025/data.csv"
        },
        {
            "type": "suppression",
            "url": "https://files.example.com/orders/10025/suppression.csv"
        },
        {
            "type": "art",
            "url": "https://files.example.com/orders/10025/artwork.pdf"
        }
    ]
}
06

Seed Addresses

Optional seed records must use the exact schema below.

Field Required Validation
fnameYesNon-empty value
lnameYesNon-empty value
addressYesNon-empty value
cityYesNon-empty value
stateYesTwo uppercase letters
zipYes12345 or 12345-1234

A single seed object or an array of seed objects is accepted. Unknown fields inside a seed record are rejected.

07

Test Mode (Sandbox Environment)

Test status is resolved from both the API credential and the request.

API Credential Request api_test Result
TestAny value or omittedTest order
ProductiontrueTest order
Productionfalse or omittedProduction order
Missing api_test account flagAny valueTest order
Malformed api_test account flagAny valueRequest fails

Test orders are stored with api_test enabled. Their names are prefixed with API Test: unless that prefix is already present.

08

Request Examples

These examples use only fields accepted by the current service.

JSON request body
{
    "id": "CLIENT-ORDER-10025",
    "name": "August Renewal Letter",
    "duedate": "2026-10-02",
    "jobtype": "Letter",
    "qty_est": 2500,
    "notes": "Process the attached data and artwork.",
    "custom_envelope": false,
    "num_inserts": 1,
    "color": "4/4",
    "papertype": "#80 Text",
    "envelopetype": "Single Window",
    "bleeds": true,
    "postage_class": "First Class Pre-Sort",
    "postage_type": "Permit Imprint",
    "dist_type": "Co-Mingle",
    "api_test": true,
    "seeds": [
        {
            "fname": "Jane",
            "lname": "Doe",
            "address": "123 Main Street",
            "city": "Reno",
            "state": "NV",
            "zip": "89501"
        }
    ],
    "data": [
        "https://files.example.com/orders/10025/data.csv"
    ],
    "art": [
        "https://files.example.com/orders/10025/letter.pdf"
    ]
}
09

Responses

Successful production and sandbox requests return different response data.

A successful order creation returns HTTP 201 Created. Production responses confirm the client-supplied order identifier. Sandbox responses additionally return the generated Redstone job number, the api_test flag, and an internal order URL so the test order can be reviewed.

Response format. JSON is the default. Use ?format=xml or an XML Accept header to request XML. XML responses are wrapped in a <response> root element.
Production success · HTTP 201
{
    "success": true,
    "environment": "production",
    "message": "Production order created successfully.",
    "data": {
        "ext_id": "CLIENT-ORDER-10025"
    }
}

HTTP Status Codes

Status Meaning
201Order created successfully.
400Empty request body or a request explicitly classified as invalid by the controller.
401Request classified as unauthorized by the controller.
405HTTP method is not allowed. Create Order requires POST.
422A structured validation error reaches the controller.
500All other exceptions. The response includes a generated reference_id.
503Endpoint is temporarily unavailable for maintenance.
10

Standard Endpoint Limits

The Create Order endpoint accepts only the fields and file-delivery methods implemented by the current service.

  • Unknown top-level order fields are rejected.
  • lightning_id is optional and requires the authenticated client to be enabled for Lightning.
  • A submitted lightning_id must resolve to an existing Lightning configuration available to that client.
  • Remote files must use public HTTP or HTTPS URLs.
  • File URLs may not contain embedded usernames or passwords.
  • Local, private, and reserved file destinations are rejected.
  • File URLs using schemes other than HTTP or HTTPS are rejected.
Do not add undocumented properties. The service uses a strict allow-list and rejects unsupported fields before the order is created.
11

Order Processing

The service follows this sequence after the request is parsed and authenticated.

  1. Normalize the authenticated client and request payload.
  2. Assign the order to the company associated with the authenticated API key.
  3. If lightning_id is supplied, verify the authenticated client is Lightning-enabled and verify the referenced Lightning configuration exists and is available to that client.
  4. Resolve test or production status.
  5. Validate allowed fields and job-specific requirements.
  6. Reject a duplicate id for the authenticated company.
  7. Validate and download all remote files.
  8. Build the internal order and determine its initial status.
  9. Save the order and generate the Redstone job number.
  10. Store the downloaded files in GridFS.
  11. Update the order with its available file icons and return the completed order to the controller.
Files are downloaded first. If a remote file cannot be retrieved or validated, the service does not create the order record.
12

Validation and Errors

Requests fail immediately when a validation or processing rule is not satisfied.

Current validation response behavior. In the provided implementation, the order service uses standard exceptions for field, duplicate, file, and persistence validation failures. Those failures therefore reach the controller's generic HTTP 500 response and return a reference_id. Separate controller branches also exist for 400, 401, and structured 422 errors.
  • Unsupported top-level fields are rejected.
  • A submitted lightning_id is rejected unless the authenticated client is Lightning-enabled and the referenced Lightning configuration exists and is available to that client.
  • All missing required fields are identified during service validation.
  • A duplicate client order ID is rejected before file download.
  • Malformed booleans are rejected instead of being silently converted.
  • Invalid job-specific fields are rejected before order creation.
  • If job-number generation fails, the service attempts to remove the newly created order.
  • If file storage fails, the service attempts to remove the order and returns the storage error.
  • Temporary downloaded files are removed after success or failure.

Duplicate Order IDs

The submitted id is stored internally as ext_id. The service checks the authenticated company and rejects a request when an order already exists with the same identifier. This duplicate check occurs before remote files are downloaded.

Submit only documented fields. This endpoint uses a strict allow-list. Internal order fields and undocumented properties are not accepted. Submit only the fields listed in the Request Fields, Remote Files, and Seed Addresses sections.
Redstone Create Order API Documentation
Version R 630-1 · Updated July 2026