1. Help Center
  2. SETUP
  3. Setting Up Other Data Sources

Creating Orders With HTTP Post

How To Create Orders

Required Fields

  • OrderID:  Unique OrderID, typically from the source Order system but can by any UNIQUE value
  • OrderDateTime:  Date & Time the order was placed in format MM/DD/YYYY HH:MMAM/PM (Correct formatting example: "9/26/2016 20:15" or "9/26/2016 8:15PM")
    • You can use “NOW” for the current Date/Time
    • Date format is important.  Using a date and time like this "4-10-17 0:00" will not work. (You need to use / not -)
    • You are welcome to use the 24 hour formatting (20:15 for example) or 12 hour time formatting (8:15PM for example)
  • OrderTimeZone:  Timezone of Contact Date/Time (EST Timezone="UTC-5", CST Timezone="UTC-6", etc)  ** these values change based on Daylight Savings Time
    • This is the timezone the date is represented in, NOT the timezone of the contact.  If your CRM system shows orders in EST, then you would use UTC-5
    • these values change based on Daylight Savings Time  
  • OrderTotal:  Amount of the Order
  • CustomerEmail:  Email address of the Customer
  • OrderSystem:  A reference field of the source system that the orders were pulled from.
    • This should be only ONE WORD and contain no spaces. For example "PayPal" or "AuthorizeNET"
  • IsRefund : YES/NO. If the HTTP Post is for an Order, then the value is NO.  If the HTTP Post is for a Refund, the value is YES
    • NOTE: To refund a payment, the refund must be submitted with the original Order ID of the initial payment. If you do not specify the same order ID a new order will be created and refunded. If this is not your intent, please be sure to reference the original order ID in the ORDERID column.

    Optional Fields

    • ProductID: Unique ProductID, typically from the source Order System
      • If the Product does not yet exist, this will be the id of the newly created product.
    • ProductName: Product Name.  
      • If the product does not yet exist, this will be the name of the newly created product.
    • CustomerState:  State of Billing Address
    • CustomerCountry:  Country of the Billing Address
    • SubscriptionID: If this order is part of a subscription, each order will have the same "SubscriptionID" which is unique to that Order.  
      • This ID represents a series of payments for one individual customer. This is NOT a Product ID to be used for multiple orders for multiple customers.  If the order is not for a recurring subscription, this field should be empty


      Important Information

      • If the order being created uses an email address which does not exist in Wicked Reports, we will create one.  We cannot have orders for contacts which do not exist.
      • If the Product used in the HTTP post does not exist in Wicked Reports, we will create the product using the provided ProductID and ProductName and associate this order with it.
      • Timezones change with Daylight savings time.  For example, EST (Eastern Standard Time) is UTC-5 part of the year and UTC-4 part of the year.  If you are setting up an automation that will run continuously, you will need to be aware of this and make sure your automation updates when daylight savings time occurs.
      • Remember:  Product information is NOT required for an order to be created.
      • Timezones change with Daylight savings time.  For example, EST (Eastern Standard Time) is UTC-5 part of the year and UTC-4 part of the year.  If you are setting up an automation that will run continuously, you will need to be aware of this and make sure your automation updates when daylight savings time occurs.
      • If using a system where you can specify the content type of the HTTP Post, the content type must be "application/x-www-form-urlencoded"

      Example HTML Web Form for creating orders using HTTP Post

      Example with text for creating orders using HTTP Post

      URL:https://api.wickedreports.com/createorder/WickedReports

      Content-Type: application/x-www-form-urlencoded

      Body:

      OrderID=1234&OrderTotal=24.51&CustomerEmail=test@example.com&OrderDateTime=07/16/2020 20:05&OrderTimeZone=UTC-8&OrderSystem=testsystem&IsRefund=NO