Order Data Transmission API

Endpoint

POST https://www.consumerpriorityservice.com/services/psm-rest.ashx

This endpoint processes a Post Sale Marketing lead based on the provided order details in JSON format.

Authentication

This API requires an access token for authentication. The token should be included in the request headers.

Headers:

Header Type Description Required
accesstoken string Bearer token for API access (Bearer <token>) Yes
Content-Type string application/json Yes

Request Format

Method: POST

The API expects a JSON payload with the following fields:

Field Type Description Required
order # string The unique order number Yes
date of purchase string Date of purchase in YYYY-MM-DD format Yes
company string Name of the company making the purchase No
first name string Customer's first name Yes
last name string Customer's last name Yes
address string Shipping address of the customer Yes
city string City of the shipping address Yes
state string State of the shipping address Yes
zip string ZIP code of the shipping address Yes
country string Country of the shipping address Yes
phone string Customer's phone number (international format preferred) Yes
email string Customer's email address Yes
manufacturer string Manufacturer of the product Yes
model string Model number of the product Yes
product url string URL to the product page No
product description string Detailed description of the product No
qty integer Quantity of the product ordered Yes
purchase price number Price of the product in USD Yes

Sample Request Body:

{
    "order #": "123456789",
    "date of purchase": "2024-09-20",
    "company": "Example Corp",
    "first name": "John",
    "last name": "Doe",
    "address": "123 Main St",
    "city": "Anytown",
    "state": "CA",
    "zip": "90210",
    "country": "USA",
    "phone": "+1-555-123-4567",
    "email": "john.doe@example.com",
    "manufacturer": "Example Appliances",
    "model": "X1234",
    "product url": "https://example.com/products/x1234",
    "product description": "Description",
    "qty": 1,
    "purchase price": 199.99
}

Response Format

Success Response (200 OK):

Field Type Description
status string Status of the operation (e.g., "success")
message string A message describing the result of the operation

Sample Success Response:

{
    "status": "success",
    "message": "successfully added"
}

Error Response (200 OK with error message):

Field Type Description
status string Status of the operation (e.g., "success")
message string A message describing the error

Sample Error Response:

{
    "status": "success",
    "message": "an error occurred"
}