-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapiary.apib
More file actions
10171 lines (9403 loc) · 373 KB
/
Copy pathapiary.apib
File metadata and controls
10171 lines (9403 loc) · 373 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
FORMAT: 1A
HOST: https://api.veeqo.com/
# Veeqo API
The Veeqo API gives you everything you need to build the world's most powerful tools for ecommerce retailers.
You can integrate any external application or service with a retailer's Veeqo account. This allows you to do just about anything you can do in the Veeqo Web App using the programming language of your choice.
Our API is built using Ruby on Rails and based on RESTful principles, using predictable and explorable URLs, HTTP requests and JSON responses.
There are two ways of authenticating your app with Veeqo:
1. [OAuth2](https://oauth.net/2/) authentication
2. API keys
## Veeqo Shipping API
We also have a Shipping API that is currently in Open Beta and is available for Enterprise customers or on request using [this form](https://docs.google.com/forms/d/e/1FAIpQLSfbjw7dXk1kpySpM_vlRsB2CNxLsGp4XaXAqMlOL6JX2OUQFA/viewform).
Our Shipping API allows you to build custom integrations with shipping carriers not currently supported in Veeqo.
You can view our Shipping API Documentation [here](https://developer.veeqo.com/docs/shipping).
## [Developer Central](https://developer.veeqo.com)
We're working hard at Veeqo to make your developing experience when building on top of our API the best it can be. We have therefore created [Developer Central](https://developer.veeqo.com) which has access to all of the resources you'll need.
We also have a [Developer Forum](https://developer-forum.veeqo.com) so if you get stuck you can get answers to your queries from our team or our growing developer community.
## Getting Started
Follow these steps below to get up and running.
1. Get a Veeqo Account
* Register for a [Veeqo developer account](https://veeqo.com)
This will take you through the same steps as a new store owner to register for a 14 day free trial of Veeqo - this trial can easily be extended by emailing helpme@support.veeqo.com
2. Set up your Authentication
* Follow our [API Authentication](#introduction/authentication) instructions
3. Explore
* Use our [API previewer](/#reference/orders) to see what each endpoint does
* Download some [code samples](/#introduction/code-samples)
* Use a tool like [Restlet](https://restlet.com/) or [Postman](https://www.getpostman.com/) to send some test requests
4. Learn More
* Check out [Developer Central](https://developer.veeqo.com) for more useful resources
5. Build and test your app.
* Build the worlds best Veeqo integration
6. Get Help
* Stuck? Check out our [Developer Forum](https://developer-forum.veeqo.com)
## Authentication
Authentication is required for your application to access data in Veeqo. There are currently two ways to authenticate your app:
1. OAuth2
2. API keys
We recommend using OAuth2 if your application is for public use by all Veeqo users and using API keys if your application is considered private and for your use only.
### Setting up OAuth Authentication
1. Set up your redirect_uri
* This is the URL that the user will be redirected to after authentication. If you're new to OAuth, Aaron Parecki has a really great [guide](https://aaronparecki.com/oauth-2-simplified/#creating-an-app) for getting started.
2. Send your details to helpme@support.veeqo.com
* Please provide us with:
- The name of your applications
- Your redirect/callback URI
* Email the details to helpme@support.veeqo.com
3. We register your application with OAuth
* Once registered we will provide you with your client_id and client_secret by email
4. Authorizing the user
* Again Aaron Parecki's [guide](https://aaronparecki.com/oauth-2-simplified/#authorization) has a really useful section on setting up user authorization.
* Within your application, you need to redirect the user to the authorize URL on app.veeqo.com. For example: `https://app.veeqo.com/oauth/authorize?client_id=4f8a5d37071f0955e3c8a3dcbf3ff0b53c0699d2085cc6b01707fb3eb9912652&redirect_uri=http%3A%2F%2Fexample.com%2Ftest_oauth_callback&response_type=code&scope=`
* The user will then confirm authorization of the app and be redirected back to your application
5. Get authorization code
* The authorization code is returned in the code parameter of the redirect uri
e.g. http://example.com/test_oauth_callback?code=acc2658ced4f9eea257c9da72acea1c97f9e1b1db2118b565355532af13591d7
* note: this code lasts only 10 minutes
6. Make a request for the permanent token
* Make a request to https://api.veeqo.com/oauth/token using client id, client secret, temporary code, e.g:
Request URL: /oauth/token
Method: POST
* Parameters:
- **grant_type**: authorization_code
- **redirect_uri**: http://example.com/test_oauth_callback 5
- **client id**: 4f8a5d37071f0955e3c8a3dcbf3ff0b53c0699d2085cc6b01707fb3eb9912652
- **client secret**: dd04814c033fdbc9a01a9b68100d359edaa41d8ad702a03ae221dd456da1d59c
- **code**: acc2658ced4f9eea257c9da72acea1c97f9e1b1db2118b565355532af13591d7
Should return a response like so:
```json
{
"access_token": "82d7b651f3634a5243c4155f8832f09b30de0c115280d0c2ef62512e6bc5312e",
"token_type": "bearer",
"created_at": 1510741588
}
```
7. Save the access_token value
* Save the returned access_token from the previous request
* Use this for any future requests
8. Make a request
* Make a request like normal with our bearer token, e.g.
Request URL: /current_user
Method: GET
Headers:
Authorization: Bearer 82d7b651f3634a5243c4155f8832f09b30de0c115280d0c2ef62512e6bc5312e
### Generating your API keys
1. Login into your [Veeqo account](https://app.veeqo.com/login)
2. Navigate to [Employees page](https://app.veeqo.com/employees)
3. Click on your user or create a **+ New Employee**
If you have multiple users we recommend creating a New Employee for each user as it makes it easier track application activity
4. Click **Refresh API Key**
5. Your API Key will be generated and stored in Veeqo should you ever need to refer back to it
As always, treat your API Key like any other password and do not share it with others as anyone who has access to your API Key has full API access to your Veeqo account.
### Using API Key
Simply include `x-api-key` into request header, for example:
```bash
curl --request GET \
--url https://api.veeqo.com/orders \
--header 'accept: application/json' \
--header 'x-api-key: YOUR API KEY HERE'
```
## Veeqo Ruby Gem
Our friends over at [COAX](https://coaxsoft.com/) have built a [Ruby Gem](https://github.com/coaxsoft/veeqo_api_ruby) to integrate with our API. If you're building with ruby then this is an invaluable resource. They also have a load of examples on the [GitHub](https://github.com/coaxsoft/veeqo_api_ruby/tree/master/examples) for the gem that are definately worth checking out.
## Limits
The API has requests rate limits per key/token powered by a [Leaky Bucket algorithm](https://en.wikipedia.org/wiki/Leaky_bucket). If requests come too frequently, they are queued in a bucket. If the queue reaches the bucket limit, the API responds with HTTP 429 error.
Current limit is **5 requests per second** with a bucket size **up to 100** requests.
## Code Samples
Learn from our examples.
All of our examples live on the VeeqoAPI GitHub page. We're working hard to add
more over the coming months.
### [Labels Downloader](https://github.com/VeeqoAPI/shipment-label-downloader)
Sample application, written in Python, shows how to retrieve shipment lables
from shipped Veeqo orders
### [Products Catalog](https://github.com/VeeqoAPI/products-list)
This example, written in PHP, illustrates how to build simple catalog
displaying products from Veeqo account
### [Dashboard](https://github.com/VeeqoAPI/dashboard)
Written in PHP and based on the same CURL script as the Products Catalog,
this live example displays a simple dashboard of orders from today and yesterday.
Similar to the way the mobile app dashboard works.
The live example can be [found here.](https://veeqo-dashboard.herokuapp.com/)
## Support
If you get stuck at any stage in your project you can find answers on our [Developer Forum](https://developer-forum.veeqo.com/). Our forum is monitored by one of our friendly team and we aim to respond to all posts within 48-hours.
## Feedback
We LOVE ❤️ feedback! It helps us to improve developer experience and make your job easier! If you have any feedback regarding our API, documentation or Developer Central please leave a comment on the forum or email [api-support@veeqo.com](mailto:api-support@veeqo.co)
## HTTP Codes
###Code: 200
__Meaning:__ OK
__Description:__ Success!
###Code: 201
__Meaning:__ Created
__Description:__ Success! Resource was successfully created. The resource that was created has been returned in the response body.
###Code: 204
__Meaning:__ No Content
__Description:__ It's gone! Resource was successfully deleted. Response body is empty after a successful DELETE request.
###Code: 400
__Meaning:__ Bad Request
__Description:__ There was invalid data posted in the request, i.e. the data isn't posted in the format we require or you have an attribute missing.
__Action Required:__ Check the request to ensure all information is posted and that it complies with the [API documentation](https://developer.veeqo.com/docs) for that endpoint.
###Code: 401
__Meaning:__ Unauthorized
__Description:__ You could not be authenticated with Veeqo. This can either be due to the API key being invalidated (updated on the account in Veeqo) or the account requiring a payment to be made to Veeqo.
__Action Required:__ Check the account in Veeqo to ensure that API key is still attached, and that there's no outstanding payments.
###Code: 404
__Meaning:__ Not Found
__Description:__ The resource that you attempted to access could not be found. This is likely due to the endpoint not existing, or a particular attribute ID passed not existing.
__Action Required:__ Check that the endpoint you're attempting to access actually exists, and ensure that all of the IDs you pass in the attributes of the request body can be found in the attached account.
###Code: 429
__Meaning:__ Limits Reached
__Description:__ The API request limit has been reached. The current limit is 5 requests per second with a bucket size up to 100 requests (this limit may differ if you have agreed enterprise limits)
__Action Required:__ Handle your requests with the API limit in mind.
###Code: 500
__Meaning:__ Internal Server Error
__Description:__ Due to a problem on our side. This could either be due to problems in the request data provided which cause the error, or due to a temporary service problem.
__Action Required:__ Double check your request is correct then try again after a few minutes. If the problem persists then check our [status page](http://status.veeqo.com) or [contact us](mailto:helpme@veeqo.com).
###Code: 503
__Meaning:__ Service Unavailable
__Description:__ Due to a temporary problem on our side.
__Action Required:__ Try again after a few minutes. If the problem persists then check our [status page](http://status.veeqo.com) or [contact us](mailto:helpme@veeqo.com).
# Group Orders
Resources related to the orders in the API.
Few important things to note. When sending a create order POST request, everything with an ID must be created before the request.
## Order Collection [/orders{?since_id,created_at_min,updated_at_min,page_size,page,query,status,tags,allocated_at}]
### List All Orders [GET]
+ Parameters
+ since_id: `12345` (integer, optional) - Restrict results to after specified ID
+ created_at_min: `2016-03-01 11:10:01` (string, optional) - Show entities created after date (format: YYYY-MM-DD HH:MM:SS)
+ updated_at_min: `2016-03-01 11:10:01` (string, optional) - Show entities updated after date (format: YYYY-MM-DD HH:MM:SS)
+ page_size: `25` (integer, optional) - Amount of results
+ Default: `12`
+ page: `1` (integer, optional) - Page to show
+ Default: `1`
+ query (string, optional) - Free text search
+ status: `awaiting_fulfillment` (enum[string], optional) - Order Status
+ Members
+ `awaiting_payment`
+ `awaiting_stock`
+ `awaiting_fulfillment`
+ `shipped`
+ `on_hold`
+ `cancelled`
+ `refunded`
+ tags: `Give+your+tag+a+name` (string, optional) - Restrict results to orders with a tag of the name provided
+ allocated_at: `3` (integer, optional) - Restrict results to orders allocated at a specific warehouse
+ Request (application/json)
+ Headers
x-api-key: 123
+ Response 200 (application/json)
+ Headers
Transfer-Encoding: chunked
X-Total-Count: 123
X-Total-Pages-Count: 12
X-Page-Index: 1
X-Per-Page: 10
X-Runtime: 0.0123
+ Body
{
"id": 13359622,
"cancel_reason": null,
"refund_amount": null,
"send_refund_email": null,
"cancelled_at": null,
"created_at": "2018-01-19T18:11:06.820Z",
"customer_viewable_notes": null,
"delivery_cost": 2.0,
"due_date": "2018-01-31T00:00:00.000Z",
"dispatch_date": null,
"international": false,
"notes": null,
"number": "rdr1234",
"receipt_printed": false,
"send_notification_email": true,
"shipped_at": null,
"status": "awaiting_stock",
"subtotal_price": 175.5,
"total_discounts": 49.5,
"total_price": 213.04,
"total_tax": 35.54,
"total_fees": 0.0,
"buyer_user_id": null,
"updated_at": "2018-01-19T18:11:07.098Z",
"payment": {
"id": 13177340,
"order_id": 13359622,
"payment_type": "paypal",
"reference_number": "PPP1234",
"created_at": "2018-01-19T18:11:06.831Z",
"updated_at": "2018-01-19T18:11:06.869Z",
"card_number": null,
"created_by_id": 23005
},
"till_id": null,
"fulfilled_by_amazon": false,
"is_amazon_prime": false,
"is_amazon_premium_order": false,
"additional_order_level_taxless_discount": 19.5,
"restock_shipped_items": false,
"adjustment_amount": 0.0,
"tags": [],
"cancelled_by": null,
"created_by": {
"id": 12345,
"login": "Phil Reynolds",
"email": "phil+api@veeqo.com",
"location": null,
"guide_completed_message_viewed": null,
"orders_walkthrough_viewed": false,
"default_warehouse_id": null,
"created_at": "2017-07-04T09:40:37.515Z",
"updated_at": "2017-12-20T11:56:02.938Z",
"company": {
"id": 12345,
"name": "Phil",
"created_at": "2017-07-04T09:40:37.495Z",
"updated_at": "2017-12-22T12:59:57.854Z",
"referring_website": null,
"card_valid": false,
"stripe_customer_id": null,
"has_right_to_use_veeqo": true,
"subscription_status": "trialing",
"billing_period_started": null,
"subscription_plan_id": 62,
"chargify_product_handle": "trial",
"chargify_current_plan": {
"name": "Unlimited",
"planId": "unlimited-monthly-veeqo",
"chargeType": "monthly",
"pricing": "£9999",
"setup_fee": null,
"product_handle": "monthly-unlimited-9999",
"product_url": null,
"features": {
"users": "Unlimited",
"products": "Unlimited",
"orders": "Unlimited",
"stores": "Unlimited",
"support": "Unlimited",
"product_pusher": true,
"stock_take": true
},
"available": false
},
"setting": {
"currency_code": "GBP",
"phone_number": "07812345678"
},
"subscription_plan": {
"id": 62,
"name": "Business[Monthly]",
"stripe_plan_id": "BUSINESS_MONTHLY_99999",
"billing_interval": "month"
}
}
},
"updated_by": null,
"delivery_method": {
"id": 171784,
"name": "Delivery Method #2",
"cost": 2.0
},
"deliver_to": {
"id": 26463776,
"first_name": "Samwise",
"last_name": "Gamgee",
"email": "Gamgee@fellowship.net",
"company": "The Fellowship",
"address1": "Bag End",
"address2": "Hobbiton",
"city": "Shire",
"country": "GB",
"state": "Middle Earth",
"zip": "SH1 1BG",
"phone": "07891234567"
},
"channel": {
"id": 12345,
"type_code": "direct",
"created_by_id": 12345,
"name": "Phone",
"currency_code": "GBP",
"state": "active",
"url": null,
"shopify_url": null,
"ebay_url": null,
"ebay_site_code_id": 3,
"country": null,
"region": "",
"city": "",
"address_line_1": "",
"address_line_2": "",
"post_code": "",
"pulled_products_at": null,
"pulled_orders_at": null,
"pending_setup": true,
"seller_id": null,
"marketplace_id": null,
"mws_auth_token": null,
"deleted_at": null,
"deleted_by_id": null,
"api2cart_store_key": null,
"bridge_url": null,
"bridge_verified": null,
"pull_pending_orders": false,
"default_send_shipment_email": true,
"automatic_product_linking_disabled": false,
"update_remote_order": true,
"successfully_fetched_stock_levels_at": null,
"create_product_if_unmatched": true,
"skip_title_matching": true,
"email": "phil+api@veeqo.com",
"skip_fba_orders_and_products": true,
"pull_stock_level_required": true,
"pull_product_properties": true,
"pull_historical_orders": false,
"adjust_orders_tax_rate": null,
"send_notification_emails_to_customers": false,
"end_ebay_listing_on_out_of_stock": false,
"update_product_attributes": true,
"max_qty_to_advert": 0,
"min_threshold_qty": 0,
"percent_of_qty": 100,
"always_set_qty": 0,
"veeqo_dictates_stock_level": true,
"with_fba": false,
"first_sync_finish_notice_marked_as_read": false,
"pull_unpaid_shopify_orders": false,
"create_product_on_ended_listings": true,
"link_to_products_linked_to_current_channel": true,
"weight_unit": null,
"import_cost_price": true,
"veeqo_dictates_price": false,
"keep_inventory_tracking_value": false,
"marketplace_country": null,
"time_zone": null,
"time_zone_offset": null,
"amazon_fulfillment_enabled": false,
"import_product_tags": true,
"import_product_brands": true,
"channel_warehouses": [],
"warehouses": [],
"stock_level_update_requests": [],
"amazon_fulfillment_setting": null,
"amazon_channel_specific": null,
"api2cart_channel_specific": null,
"additional_api2cart_site": null,
"time_since_product_sync": null,
"time_since_order_sync": null,
"time_since_tried_fetch_stock_level": null,
"time_since_successfully_fetch_stock_level": null,
"default_warehouse": {
"id": 12345,
"name": "My Warehouse",
"user_id": null,
"address_line_1": "",
"address_line_2": "",
"city": "",
"region": "",
"country": null,
"post_code": "",
"inventory_type_code": "wavg",
"default_min_reorder": 0,
"click_and_collect_enabled": false,
"click_and_collect_days": null,
"created_by_id": 12345,
"updated_by_id": null,
"deleted_at": null,
"deleted_by_id": null,
"created_at": "2017-07-04T09:40:37.539Z",
"updated_at": "2017-07-04T09:40:37.539Z",
"phone": null,
"requested_carrier_account": null,
"display_position": 9999
},
"remote": false
},
"customer": {
"id": 12137221,
"email": "baggins@ringbearers.org",
"phone": "07891234567",
"mobile": "07891234567",
"created_by_id": 12345,
"billing_address": {
"id": 26463775,
"first_name": "Frodo",
"last_name": "Baggins",
"address1": "The New Bag End",
"address2": "1st Avenue",
"city": "Valinor",
"company": "The Ring Bearers",
"country": "GB",
"state": "The Undying Lands",
"zip": "VA1 1NB",
"phone": "07891234567",
"email": "baggins@ringbearers.org"
},
"shipping_addresses": [
{
"id": 26463776,
"first_name": "Samwise",
"last_name": "Gamgee",
"email": "Gamgee@fellowship.net",
"company": "The Fellowship",
"address1": "Bag End",
"address2": "Hobbiton",
"city": "Shire",
"country": "GB",
"state": "Middle Earth",
"zip": "SH1 1BG",
"phone": "07891234567"
}
]
},
"customer_note": {
"id": 1013050,
"text": "Please tell Sam to look after this puppy. --This is a customer note--",
"order_id": 13359622
},
"allocations": [
{
"id": 10214654,
"updated_at": "2018-01-19T18:11:07.095Z",
"created_at": "2018-01-19T18:11:06.886Z",
"total_weight": 0,
"weight_unit": "g",
"allocated_by_id": 12345,
"order_id": 13359622,
"packed_completely": null,
"line_items": [
{
"id": 13715700,
"quantity": 1,
"picked_quantity": 0,
"created_at": "2018-01-19T18:11:06.891Z",
"updated_at": "2018-01-19T18:11:06.891Z",
"sellable": {
"total_quantity_sold": 8,
"allocated_stock_level_at_all_warehouses": 8,
"id": 13847534,
"type": "ProductVariant",
"title": "Black",
"sku_code": "M2IEG-B",
"upc_code": "4044155094916",
"model_number": "",
"price": 75.0,
"cost_price": 40.0,
"min_reorder_level": 0,
"quantity_to_reorder": 0,
"created_by_id": 12345,
"created_at": "2017-09-29T09:45:01.265Z",
"updated_at": "2018-01-19T18:11:07.111Z",
"weight_grams": 0.0,
"weight_unit": "g",
"product_title": "Sennheiser Momentum In-Ear",
"full_title": "Sennheiser Momentum In-Ear Black",
"sellable_title": "Black",
"profit": 35.0,
"margin": 46.67,
"tax_rate": 20.0,
"product": {
"id": 5793641,
"title": "Sennheiser Momentum In-Ear",
"weight": 0,
"origin_country": "",
"hs_tariff_number": null,
"tax_rate": 0,
"main_image": {
"id": 10319279,
"binary_data": null,
"content_type": null,
"display_position": null,
"created_by_id": null,
"updated_by_id": null,
"deleted_at": null,
"deleted_by_id": null,
"created_at": "2017-08-21T11:50:24.545Z",
"updated_at": "2017-08-21T11:50:27.358Z",
"src": null,
"product_id": 5793641,
"picture_file_name": "senn.jpg",
"picture_content_type": "image/jpeg",
"picture_file_size": 165161,
"picture_updated_at": "2017-08-21T11:50:24.450Z",
"picture_order": 0
},
"estimated_delivery": null,
"deleted_at": null,
"deleted_by_id": null,
"description": "Quintessential. Forward Thinking. Custom machined stainless steel sound tunnels for acoustic precision.",
"main_image_src": "https://veeqo-production-storage.s3.amazonaws.com/images/10319279/senn_original.jpg?1503316224"
},
"stock_entries": [
{
"sellable_id": 13847534,
"warehouse_id": 12345,
"infinite": false,
"allocated_stock_level": 8,
"warehouse": {
"id": 12345,
"name": "My Warehouse",
"user_id": null,
"address_line_1": "",
"address_line_2": "",
"city": "",
"region": "",
"country": null,
"post_code": "",
"inventory_type_code": "wavg",
"default_min_reorder": 0,
"click_and_collect_enabled": false,
"click_and_collect_days": null,
"created_by_id": 12345,
"updated_by_id": null,
"deleted_at": null,
"deleted_by_id": null,
"created_at": "2017-07-04T09:40:37.539Z",
"updated_at": "2017-07-04T09:40:37.539Z",
"phone": null,
"requested_carrier_account": null,
"display_position": 9999
},
"location": "flow",
"stock_running_low": false,
"updated_at": "2018-01-19T18:11:06.897Z",
"incoming_stock_level": 0,
"physical_stock_level": 21,
"available_stock_level": 13,
"sellable_on_hand_value": 840.0
}
],
"variant_option_specifics": [
{
"id": 6083049,
"product_specific_id": 2622355,
"product_property_id": 58230,
"product_property_name": "Colour",
"value": "Black"
}
],
"variant_property_specifics": [],
"measurement_attributes": {
"id": 12268074,
"width": 0.0,
"height": 0.0,
"depth": 0.0,
"dimensions_unit": "cm"
},
"images": [],
"active_channels": [],
"channel_sellables": [],
"available_stock_level_at_all_warehouses": 13,
"stock_level_at_all_warehouses": 21,
"on_hand_value": 840.0,
"inventory": {
"infinite": false,
"physical_stock_level_at_all_warehouses": 21,
"allocated_stock_level_at_all_warehouses": 8,
"available_stock_level_at_all_warehouses": 13,
"incoming_stock_level_at_all_warehouses": 0
},
"weight": 0.0
}
}
],
"recommended_shipping_options": null,
"matched_parcel_properties_criteria": null,
"shipment": null,
"warehouse": {
"address_line_1": "",
"address_line_2": "",
"city": "",
"click_and_collect_days": null,
"click_and_collect_enabled": false,
"country": null,
"created_at": "2017-07-04T09:40:37.539Z",
"created_by_id": 12345,
"default_min_reorder": 0,
"deleted_at": null,
"deleted_by_id": null,
"id": 12345,
"inventory_type_code": "wavg",
"name": "My Warehouse",
"phone": null,
"post_code": "",
"region": "",
"display_position": 9999,
"updated_at": "2017-07-04T09:40:37.539Z",
"updated_by_id": null,
"requested_carrier_account": null
}
}
],
"employee_notes": [
{
"id": 887051,
"text": "Package contains a dog. Use suitable box. --This is an internal note--",
"order_id": 13359622,
"created_at": "2018-01-19T18:11:06.850Z",
"created_by": {
"id": 12345,
"login": "Phil Reynolds",
"email": "phil+apitest@veeqo.com",
"location": null,
"guide_completed_message_viewed": null,
"orders_walkthrough_viewed": false,
"default_warehouse_id": null,
"created_at": "2017-07-04T09:40:37.515Z",
"updated_at": "2017-12-20T11:56:02.938Z",
"company": {
"id": 12345,
"name": "Phil",
"created_at": "2017-07-04T09:40:37.495Z",
"updated_at": "2017-12-22T12:59:57.854Z",
"referring_website": null,
"card_valid": false,
"stripe_customer_id": null,
"has_right_to_use_veeqo": true,
"subscription_status": "trialing",
"billing_period_started": null,
"subscription_plan_id": 62,
"chargify_product_handle": "trial",
"chargify_current_plan": {
"name": "Unlimited",
"planId": "unlimited-monthly-veeqo",
"chargeType": "monthly",
"pricing": "£9999",
"setup_fee": null,
"product_handle": "monthly-unlimited-9999",
"product_url": null,
"features": {
"users": "Unlimited",
"products": "Unlimited",
"orders": "Unlimited",
"stores": "Unlimited",
"support": "Unlimited",
"product_pusher": true,
"stock_take": true
},
"available": false
},
"setting": {
"currency_code": "GBP",
"phone_number": "07812345678"
},
"subscription_plan": {
"id": 62,
"name": "Business[Monthly]",
"stripe_plan_id": "BUSINESS_MONTHLY_12345",
"billing_interval": "month"
}
}
}
}
],
"line_items": [
{
"id": 17976358,
"price_per_unit": 150.0,
"quantity": 1,
"tax_rate": 0.2,
"taxless_discount_per_unit": 30.0,
"additional_options": null,
"created_at": "2018-01-19T18:11:06.829Z",
"updated_at": "2018-01-19T18:11:06.829Z",
"sellable": {
"total_quantity_sold": 14,
"allocated_stock_level_at_all_warehouses": 13,
"id": 14358568,
"type": "ProductVariant",
"title": "Puppy - ProdVariantTitle",
"sku_code": "g-dog-2",
"upc_code": "",
"model_number": "",
"price": 150.0,
"cost_price": 100.0,
"min_reorder_level": 0,
"quantity_to_reorder": 0,
"created_by_id": 12345,
"created_at": "2017-10-16T15:26:15.810Z",
"updated_at": "2018-01-19T18:08:36.295Z",
"weight_grams": 0.0,
"weight_unit": "g",
"product_title": "Golden Retriever Dog - Title",
"full_title": "Golden Retriever Dog - Title Puppy - ProdVariantTitle",
"sellable_title": "Puppy - ProdVariantTitle",
"profit": 50.0,
"margin": 33.33,
"tax_rate": 0.0,
"product": {
"id": 8851441,
"title": "Golden Retriever Dog - Title",
"weight": 0,
"origin_country": null,
"hs_tariff_number": null,
"tax_rate": 0,
"main_image": null,
"estimated_delivery": null,
"deleted_at": null,
"deleted_by_id": null,
"description": "Golden Retriever Dog - Description",
"main_image_src": null
},
"stock_entries": [
{
"sellable_id": 14358568,
"warehouse_id": 12345,
"infinite": false,
"allocated_stock_level": 13,
"warehouse": {
"id": 12345,
"name": "My Warehouse",
"user_id": null,
"address_line_1": "",
"address_line_2": "",
"city": "",
"region": "",
"country": null,
"post_code": "",
"inventory_type_code": "wavg",
"default_min_reorder": 0,
"click_and_collect_enabled": false,
"click_and_collect_days": null,
"created_by_id": 12345,
"updated_by_id": null,
"deleted_at": null,
"deleted_by_id": null,
"created_at": "2017-07-04T09:40:37.539Z",
"updated_at": "2017-07-04T09:40:37.539Z",
"phone": null,
"requested_carrier_account": null,
"display_position": 9999
},
"location": "Kennels",
"stock_running_low": false,
"updated_at": "2018-01-19T18:08:36.077Z",
"incoming_stock_level": 0,
"physical_stock_level": 9,
"available_stock_level": -4,
"sellable_on_hand_value": 900.0
},
{
"id": 18867592,
"sellable_id": 14358568,
"warehouse_id": 12345,
"infinite": false,
"allocated_stock_level": 0,
"warehouse": {
"id": 12345,
"name": "Warehouse #2",
"user_id": null,
"address_line_1": "",
"address_line_2": "",
"city": "",
"region": "",
"country": "GB",
"post_code": "",
"inventory_type_code": "wavg",
"default_min_reorder": 0,
"click_and_collect_enabled": false,
"click_and_collect_days": "",
"created_by_id": 12345,
"updated_by_id": null,
"deleted_at": null,
"deleted_by_id": null,
"created_at": "2018-01-18T12:22:50.522Z",
"updated_at": "2018-01-18T12:22:50.522Z",
"phone": "1234567890",
"requested_carrier_account": null,
"display_position": 9999
},
"location": null,
"stock_running_low": false,
"updated_at": "2018-01-19T18:08:06.694Z",
"incoming_stock_level": 0,
"physical_stock_level": 100,
"available_stock_level": 100,
"sellable_on_hand_value": 10000.0
}
],
"variant_option_specifics": [],
"variant_property_specifics": [],
"measurement_attributes": {
"id": 12810244,
"width": 0.0,
"height": 0.0,
"depth": 0.0,
"dimensions_unit": "cm"
},
"images": [],
"active_channels": [],
"channel_sellables": [],
"available_stock_level_at_all_warehouses": 96,
"stock_level_at_all_warehouses": 109,
"on_hand_value": 10900.0,
"inventory": {
"infinite": false,
"physical_stock_level_at_all_warehouses": 109,
"allocated_stock_level_at_all_warehouses": 13,
"available_stock_level_at_all_warehouses": 96,
"incoming_stock_level_at_all_warehouses": 0
},
"weight": 0.0
}
},
{
"id": 17976357,
"price_per_unit": 75.0,
"quantity": 1,
"tax_rate": 0.2,
"taxless_discount_per_unit": 0.0,
"additional_options": null,
"created_at": "2018-01-19T18:11:06.826Z",
"updated_at": "2018-01-19T18:11:06.826Z",
"sellable": {
"total_quantity_sold": 8,
"allocated_stock_level_at_all_warehouses": 8,
"id": 13847534,
"type": "ProductVariant",
"title": "Black",
"sku_code": "M2IEG-B",
"upc_code": "4044155094916",
"model_number": "",
"price": 75.0,
"cost_price": 40.0,
"min_reorder_level": 0,
"quantity_to_reorder": 0,
"created_by_id": 12345,
"created_at": "2017-09-29T09:45:01.265Z",
"updated_at": "2018-01-19T18:11:07.111Z",
"weight_grams": 0.0,
"weight_unit": "g",
"product_title": "Sennheiser Momentum In-Ear",
"full_title": "Sennheiser Momentum In-Ear Black",
"sellable_title": "Black",
"profit": 35.0,
"margin": 46.67,
"tax_rate": 20.0,
"product": {
"id": 5793641,
"title": "Sennheiser Momentum In-Ear",
"weight": 0,
"origin_country": "",
"hs_tariff_number": null,
"tax_rate": 0,
"main_image": {
"id": 10319279,
"binary_data": null,
"content_type": null,
"display_position": null,
"created_by_id": null,
"updated_by_id": null,
"deleted_at": null,