Ecommerce

Intro

Connect your custom eCommerce shop with sendmunk

Endpoint: https://sendmunk.com/api/v1/shop

These endpoints are only for users who want to integrate Sendmunk with their custom shop and currently, only the activity content can be updated. content not required but will throw necessary errors if active. If no content is passed to the endpoint, the activity will be returned.

Get Shop's Info

GET /shop

Required parameters
  • api_key  - Your API public key.

List Shop Products

GET /shop/products

Required parameters
  • api_key  - Your API public key.
Optional parameters
  • limit  - Limit and paginate the output

Product Details

GET /shop/products/{product_id}

Required parameters
-H 'Content-Type: application/json \'",'{ "data": '.$product_response.' }') !!}

List Shop Orders

GET /shop/orders

Required parameters
  • api_key  - Your API public key.
Optional parameters
  • limit  - Limit and paginate the output

Order Details

GET /shop/orders/{order_id}

Required parameters
  • api_key  - Your API public key.

List Shop Customers

GET /shop/customers

Required parameters
  • api_key  - Your API public key.
Optional parameters
  • limit  - Limit and paginate the output

Customer Details

GET /shop/customers/{customer_id}

Required parameters
  • api_key  - Your API public key.

List Shop Checkouts

GET /shop/checkouts

Required parameters
  • api_key  - Your API public key.
Optional parameters
  • limit  - Limit and paginate the output

Checkout Details

GET /shop/checkouts/{checkout_id}

Required parameters
  • api_key  - Your API public key.

Cart Details

GET /shop/carts/{cart_id}

Required parameters
  • api_key  - Your API public key.

Create Shop

POST /shop

Required parameters
  • api_secret  - Your API private key.
  • domain  - Shop domain name. This must be a valid URL (i.e must include http:// or https://).
  • email  - Your Shop email.

Create Product

POST /shop/product

Required parameters
  • api_secret  - Your API private key.
  • id  - ID of the product.
  • title  - Name of the product.
  • type  - Your product type. e.g Phone is a product type for Samsung A70 smartphone.
  • created_at  - Date when product was created.
  • updated_at  - Date when product was last updated.
  • variants  - Array of product variants. Each variant array takes in the following required parameters id, title,
    price, created_at, updated_at, and optional parameters of sku, compare_at_price and image_id
Optional parameters
  • vendor  - The name of the product vendor.
  • image_id  - The ID of the product image.
  • sku  - The sku of the product.
  • price  - The price of the product. e.g "100.00"
  • status  - The status of the product can either be active, archived, draft
  • images  - Array of product images. Each image array takes in the following required parameters id, src,
    created_at, updated_at, and optional parameter of width, height and alt

Update Product

POST /shop/products/{product_id}

Required parameters
  • api_secret  - Your API private key.
Optional parameters
  • title  - Name of the product.
  • type  - Your product type. e.g Phone is a product type for Samsung A70 smartphone.
  • created_at  - Date when product was created.
  • updated_at  - Date when product was last updated.
  • variants  - Array of product variants. Each variant array takes in the following required parameters id, and optional parameters of title, price, created_at, updated_at, sku, compare_at_price and image_id
  • vendor  - The name of the product vendor.
  • image_id  - The ID of the product image.
  • sku  - The sku of the product.
  • price  - The price of the product. e.g "100.00"
  • status  - The status of the product can either be active, archived, draft
  • images  - Array of product images. Each image array takes in the following required parameters id, and optional parameter of src, created_at, updated_at, width, height and alt

Create Order

POST /shop/order

Required parameters
  • api_secret  - Your API private key.
  • id  - ID of the order.
  • customer_id  - ID of already created customer on Sendmunk.
  • currency_code  - The three-letter code (ISO 4217 format) for the shop currency.
  • subtotal_price  - The price of the order in the shop currency after discounts but before shipping, duties, taxes, and tips.
  • status  - The status of the order it can either be open, closed, cancelled, any
  • payment_status  - The financial status of the order it can either be pending, authorized, partially_paid, refunded, partially_refunded, paid, voided
  • created_at  - Date when order was created.
  • updated_at  - Date when order was last updated.
  • line_items  - An array list of line item objects, each containing information about an item in the order. Each object has the following required properties id, is_refunded, quantity, price, variant_id, and optional parameter lists of : fulfillment_id, quantity_refunded and refund_amount
  • transaction  - A json list of items that describes the order transaction, it must contain the following list of parameters: id, amount, status, kind, currency, created_at, and might optionally have the following added index: gateway, error_code, processed_at, payment_details, receipt, parent_id
Optional parameters
  • processing_method  - How the payment was processed. It has the following valid values: checkout, direct, manual, offsite, express, free
  • fulfillment_status  - The order's status in terms of fulfilled line items. Valid values: fulfilled, partial, restocked, null.
  • cart_token  - A unique value when referencing the cart that's associated with the order.
  • name  - The order name.
  • cancelled_at  - The date and time when the order was canceled.
  • closed_at  - The date and time when the order was closed.
  • processed_at  - The date and time when an order was processed.
  • checkout_token  - A unique value when referencing the checkout that's associated with the order.
  • shipping_address  - The mailing address to where the order will be shipped. It has the following properties: address1, address2, city, company, first_name, last_name, latitude, longitude, phone, province, country_code, zip, province_code, name, country.
  • billing_address  - The mailing address associated with the payment method. It has the following properties: company, address1, address2, city, country, first_name, last_name, latitude, longitude, phone, country_code, zip, province_code, province, name.
  • status_url  - Address to the order status page.
  • total_shipping_price_set  - The total shipping price of the order, excluding discounts and returns, in shop and presentment currencies. It include the following properties: amount, currency_code
  • ip_address  - ip_address of the browser used to make the order.
  • coupon_discount  - The order coupon discount.
  • discount_amount  - The total order granted on order.
  • refunded_amount  - The total amount refunded on order.
  • fulfillments  - An array of fulfillments associated with the order. Each fulfillment should include the following required parameters : id, status and the might include the following optional parameters: shipment_status, tracking_url, name, service, tracking_company, tracking_number

Update Order

POST /shop/orders/{order_id}

Required parameters
  • api_secret  - Your API private key.
Optional parameters
  • customer_id  - ID of already created customer on Sendmunk.
  • currency_code  - The three-letter code (ISO 4217 format) for the shop currency.
  • subtotal_price  - The price of the order in the shop currency after discounts but before shipping, duties, taxes, and tips.
  • status  - The status of the order it can either be open, closed, cancelled, any
  • payment_status  - The financial status of the order it can either be pending, authorized, partially_paid, refunded, partially_refunded, paid, voided
  • created_at  - Date when order was created.
  • updated_at  - Date when order was last updated.
  • transaction  - A json list of items that describes the order transaction, it must contain the following list of parameters: id, amount, status, kind, currency, created_at, and might optionally have the following added index: gateway, error_code, processed_at, payment_details, receipt, parent_id
  • processing_method  - How the payment was processed. It has the following valid values: checkout, direct, manual, offsite, express, free
  • fulfillment_status  - The order's status in terms of fulfilled line items. Valid values: fulfilled, partial, restocked, null.
  • cart_token  - A unique value when referencing the cart that's associated with the order.
  • name  - The order name.
  • cancelled_at  - The date and time when the order was canceled.
  • closed_at  - The date and time when the order was closed.
  • processed_at  - The date and time when an order was processed.
  • checkout_token  - A unique value when referencing the checkout that's associated with the order.
  • shipping_address  - The mailing address to where the order will be shipped. It has the following properties: address1, address2, city, company, first_name, last_name, latitude, longitude, phone, province, country_code, zip, province_code, name, country.
  • billing_address  - The mailing address associated with the payment method. It has the following properties: company, address1, address2, city, country, first_name, last_name, latitude, longitude, phone, country_code, zip, province_code, province, name.
  • status_url  - Address to the order status page.
  • total_shipping_price_set  - The total shipping price of the order, excluding discounts and returns, in shop and presentment currencies. It include the following properties: amount, currency_code
  • ip_address  - ip_address of the browser used to make the order.
  • coupon_discount  - The order coupon discount.
  • discount_amount  - The total order granted on order.
  • refunded_amount  - The total amount refunded on order.
  • fulfillments  - An array of fulfillments associated with the order. Each fulfillment should include the following required parameters : id, status and the might include the following optional parameters: shipment_status, tracking_url, name, service, tracking_company, tracking_number

Create Customer

POST /shop/customer

Required parameters
  • api_secret  - Your API private key.
  • id  - ID of the customer.
  • email (only required when phone is null) - Email of the customer.
  • phone (only required when email is null) - Phone number of the customer.
  • created_at  - Date when customer was created.
  • updated_at  - Date when customer was last updated.
Optional parameters
  • first_name  - First name of customer
  • last_name  - Last name of customer

Update Customer

POST /shop/customers/{customer_id}

Required parameters
  • api_secret  - Your API private key.
  • email (only required when phone is null) - Email of the customer.
  • phone (only required when email is null) - Phone number of the customer.
Optional parameters
  • first_name  - First name of customer
  • last_name  - Last name of customer
  • created_at  - Date when customer was created.
  • updated_at  - Date when customer was last updated.

Create Checkout

POST /shop/checkout

Required parameters
  • api_secret  - Your API private key.
  • id  - ID of the checkout.
  • cart_id  - ID of cart associated with checkout.
  • created_at  - Date when checkout was created.
  • updated_at  - Date when checkout was last updated.
Optional parameters
  • completed_at  - Date when checkout was completed
  • closed_at  - Date when checkout was closed
  • abandoned_checkout_url  - Url that links to checkout page

Update Checkout

POST /shop/checkouts/{checkout_id}

Required parameters
  • api_secret  - Your API private key.
Optional parameters
  • completed_at  - Date when checkout was completed
  • closed_at  - Date when checkout was closed
  • abandoned_checkout_url  - Url that links to checkout page
  • created_at  - Date when checkout was created.
  • updated_at  - Date when checkout was last updated.

Pause Shop

POST /shop/pause

Required parameters
  • api_secret  - Your API private key.

Activate Shop

POST /shop/activate

Required parameters
  • api_secret  - Your API private key.

Add To Cart

POST /shop/carts/{cart_id}/add

Required parameters
  • api_secret  - Your API private key.
  • customer_id  - ID of cudtomer that owns the cart.
  • item  - An array of items in the cart. Each item should include the following required parameters : id, variant_id, quantity and the might include the following optional parameters: price, currency_code
Optional parameters
  • ip_address  - Ip-address of cart browser.
  • created_at  - Date when cart was created.
  • updated_at  - Date when cart was last updated.

Remove From Cart

POST /shop/carts/{cart_id}/remove

Required parameters
  • api_secret  - Your API private key.
  • items_id  - An array of item IDs that should be removed from the cart.

Update Cart Items

POST /shop/carts/{cart_id}

Required parameters
  • api_secret  - Your API private key.
  • items  - An array of items in the cart. Each item should include the following required parameters : id, variant_id and the might include the following optional parameters: quantity, price, currency_code

Delete Subscriber Activities

DELETE /subscribers/{subscriber_id}/activities

Delete all custom shop activities of a subscriber

Required parameters
  • api_secret  - Your API private key.

Delete Shop Product

DELETE /shop/products/{product_id}

Required parameters
  • api_secret  - Your API private key.

Delete Shop Order

DELETE /shop/orders/{order_id}

Required parameters
  • api_secret  - Your API private key.

Delete Shop Customer

DELETE /shop/customers/{customer_id}

Required parameters
  • api_secret  - Your API private key.

Delete Shop Checkout

DELETE /shop/checkouts/{checkout_id}

Required parameters
  • api_secret  - Your API private key.

Delete Shop

DELETE /shop

Required parameters
  • api_secret  - Your API private key.