According to the documentation, the expected data format is only JSON (unlike the previous XML or Json), but unfortunately there is no additional explanation as to what data structure is expected for each endpoint.
Here is the only example of the POST request format from the current documentation for creating a coupon:
REST request URI
POST http://private-anon-0fe404a22-woocommercev2.apiary-mock.com/coupons?fields=id,code&filter=filter[limit]=100&page=2
Java code (pasted from the documentation)
Client client = ClientBuilder.newClient(); Entity payload = Entity.json("{ 'coupon': { 'code': 'autumn-is-coming', 'type': 'fixed_cart', 'amount': '4.00', 'individual_use': true, 'description': '' }}"); Response response = client.target("http://private-anon-0fe404a22-woocommercev2.apiary-mock.com") .path("/coupons{?fields,filter,page}") .request(MediaType.APPLICATION_JSON_TYPE) .post(payload); System.out.println("status: " + response.getStatus()); System.out.println("headers: " + response.getHeaders()); System.out.println("body:" + response.readEntity(String.class));
Json answer
{ "coupon": { "id": 21548, "code": "augustheat", "type": "fixed_cart", "created_at": "2014-08-30T19:25:48Z", "updated_at": "2014-08-30T19:25:48Z", "amount": "5.00", "individual_use": false, "product_ids": [], "exclude_product_ids": [], "usage_limit": null, "usage_limit_per_user": null, "limit_usage_to_x_items": 0, "usage_count": 0, "expiry_date": "2014-08-30T21:22:13Z", "apply_before_tax": true, "enable_free_shipping": false, "product_category_ids": [], "exclude_product_category_ids": [], "exclude_sale_items": false, "minimum_amount": "0.00", "maximum_amount": "0.00", "customer_emails": [], "description": "Beat the August heat with $5 off your purchase!" } }
http://docs.woocommercev2.apiary.io/#reference/coupons/coupons-collection/create-a-coupon
Given that the API claims to accept POST requests for all relevant endpoints, this should be possible with a purchase order.