How do I send orders without WooCommerce?
Updated · API
If your store doesn't run on WooCommerce, your own code can send orders to PepReviewPro. Records orders from any storefront, with their status, totals, and where the buyer came from, and queues review requests when an order reaches the status your store asks for. Sending an order again updates it. The SDK makes this call for you. How do I send orders from my checkout?
What you need
An API key with Send orders (store:orders). How do I create an API key?
A store key works too. On the Integrations page, the HTML tab creates one under Add your key and shows this call as a curl example under Send each order.
Send orders
Call POST /api/v1/orders with a JSON body:
store(string, required): The store's slug.import(boolean): True for past orders. They are saved and credited, and no email is queued.orders(Order[], required): 1 to 200 orders.Order.id(string | integer, required): Your order id. It comes back as a string.Order.status(pending | paid | completed | refunded | cancelled, required): Review requests are queued oncompleted, or also onpaidwhen the store asks for it.refundedandcancelledskip any still queued.Order.email(string): The buyer's email, up to 255 characters. No email, no review request.Order.name(string): The buyer's full name.Order.customer_id(string | integer): Your customer id. Only whole numbers are kept.Order.total, Order.currency(number, string): The order total in major units, and its currency code.Order.line_items({ product_id, variation_id, name, quantity, total }[]): Up to 500 items.product_idis your own product id, as in the catalog. The first item names the review request.Order.created_at, Order.paid_at, Order.completed_at(string): ISO 8601 times.Order.attribution({ landing_url, referrer, utm_source, utm_medium, utm_campaign, utm_content, utm_term, first_seen_at }): Where the buyer's visit began. Aprp_click_idinlanding_urlcredits the order to the PepReviewPro click that sent them.Order.customer_ip, Order.customer_user_agent(string): The buyer's at checkout. We match them to a profile view, then keep only a hash.Order.reviews_seen_at(integer): Unix seconds when your reviews widget last showed the buyer your reviews.
Send an Idempotency-Key header with each call, and the same one when you retry it. A retry is then never applied twice.
Find your store's slug
GET /api/v1/my-stores lists your stores. slug is what every other endpoint takes as store.
What happens next
status in each result is created, updated, or unchanged, so a re-send of recent orders is safe and shows what it changed. skipped_reason says why nothing was queued: import, not_trigger_status, nothing_to_email (no email or no items), or no_active_campaign. Review requests go out only from campaigns that are on.
If you use my-orders
POST /api/v1/my-orders still works, but it is deprecated. To move, send store instead of store_id, put each order in orders, and give each one a status. Send completed for the orders you sent before.
Was this helpful?