· 6 years ago · Sep 17, 2019, 08:02 PM
1
2Public
3{"sku":"produto_pai",
4 "ean":"21313213131",
5 "ncm":"111",
6 "name":"Nome do produto pai",
7 "external":"Codigo_do_produto_pai_no_outro_sistema",
8 "quantity":2,
9 "special_price":9.90,
10 "price":12.45,
11 "short_description":"Descrição resumida do produto",
12 "description": "descrição detalada do produto",
13 "brand":"marca",
14 "cost":2.21,
15 "warranty_time":3,
16 "warranty_message":"3 meses de garantia",
17 "link":"http://site.com.br/esseproduto",
18 "available":1,
19 "categories":[
20 {"name":"categoria base"},
21 {"name":"categoria base > subcatgoria"},
22 {"name":"categoria base > subcatgoria > tipo"},
23 {"name":"categoria base > outrasubcategoria > outrotipo"}
24 ],
25 "handling_time":1,
26 "manufacture_time":1,
27 "dimension":{
28 "length":22,
29 "width":22,
30 "height":22,
31 "weight":22
32 },
33 "attributes":
34 [
35 {
36 "code":"gender","label":"Genero","value":{"code":"f","label":"feminino"}
37 }
38 ],
39 "photos":[
40 {
41 "url": "http://www.site.com.br/enderecoimagem.jpg",
42 "name": "imagem 1 do produto",
43 "title": "imagem 1 do produto",
44 "order": 1,
45 "external": "http://www.site.com.br/enderecoimagem.jpg"
46 },
47 {
48 "url": "http://www.site.com.br/enderecoimagem2.jpg",
49 "name": "imagem 2 do produto",
50 "title": "imagem 2 do produto",
51 "order": 2,
52 "external": "http://www.site.com.br/enderecoimagem.jpg"
53 }
54 ],
55
56 "price_table":[
57 {
58 "code":"reseller",
59 "label":"Preço para reseller",
60 "price":5.50,
61 "special_price":4.32,
62 "action":"overwrite"
63 },
64 {
65 "code":"mercadolivre",
66 "label":"Preço para o mercadolivre",
67 "price":22.50,
68 "special_price":14.32,
69 "action":"overwrite"
70 },
71 {
72 "code":"b2w",
73 "label":"Preço para a b2w",
74 "action":"increase",
75 "percentage":10
76 }
77 ],
78"stock_table":[
79 {
80 "code":"{YOUR_CODE}",
81 "type":"{own OR supplier}",
82 "priority":"{0 is the high priority}",
83 "quantity":2,
84 "price":2.22,
85 "special_price":1.22,
86 "handling_time":10
87 },
88 {
89 "code":"{YOUR_CODE_2}",
90 "type":"{own OR supplier}",
91 "priority":"{0 is the high priority}",
92 "quantity":3,
93 "price":2.22,
94 "special_price":1.22,
95 "handling_time":10
96 }
97],
98"variations":[
99 {
100 "sku": "produto_filho",
101 "ean": "21313213131",
102 "name":"Nome do produto pai",
103 "external":"Codigo_do_produto_pai_no_outro_sistema",
104 "quantity":2,
105 "special_price":9.90,
106 "price":12.45,
107 "attributes":
108 [
109 {
110 "code":"size","label":"Tamanho","value":{"code":"p","label":"pequeno"}
111 }
112 ],
113 "stock_table":[
114 {
115 "code":"{YOUR_CODE}",
116 "type":"{own OR supplier}",
117 "priority":"{0 is the high priority}",
118 "quantity":2,
119 "price":2.22,
120 "special_price":1.22,
121 "handling_time":10
122 },
123 {
124 "code":"{YOUR_CODE_2}",
125 "type":"{own OR supplier}",
126 "priority":"{0 is the high priority}",
127 "quantity":3,
128 "price":2.22,
129 "special_price":1.22,
130 "handling_time":10
131 }
132 ],
133 "photos":[
134 {
135 "url": "http://www.site.com.br/enderecoimagem.jpg",
136 "name": "imagem 1 do produto",
137 "title": "imagem 1 do produto",
138 "order": 1,
139 "external": "http://www.site.com.br/enderecoimagem.jpg"
140 },
141 {
142 "url": "http://www.site.com.br/enderecoimagem2.jpg",
143 "name": "imagem 2 do produto",
144 "title": "imagem 2 do produto",
145 "order": 2,
146 "external": "http://www.site.com.br/enderecoimagem.jpg"
147 }
148 ]
149 }
150 ]
151}
152Pluggto Public API
153
154Use this postman collection to easy connect to PluggTo;
155
156ENDPOINTS
157PluggTo API is accessible by the URL https://api.plugg.to
158
159Actualy exists 4 types of resources:
160
161Products/Skus
162Orders
163Messages
164Shipping
165Products and Skus is the same, the Skus endpoint was builded to avoid the need to to know the internal id of some sku to view it or updated
166
167We recommeded to use the Products endpoint ONLY if you need to search some product by attribute or get all, or if you received a notification with the product resource id and with notication type = product
168
169AUTHENTICATION
170To make any request you going to need a valid access token that need be send as a parameter in the URL (exemple: http://api.plugg.to/RESOURCE?access_token={access_token}
171
172To get a access tokens you have to make authenticate using APP authentication method or Plugin authentication method.
173
174Check the Authentication Api
175
176Language
177Authentication
178
179Introduction to authentication
180
181Pluggto authentication was built folowing Oauth 2.0 Protocol
182
183To access the Pluggto Resouces (Products,Orders,Messages) you must in all call the access_token parameter.
184
185To get a access token you should one of the folowing authentication methods. By (password,authorization_code,refresh_token)
186
187Each "access_token" is valid for 1 hour, after is necessary to repet the authentication.
188
189For better performace DONT'T generate a new authentication for each call that you make.
190
191POST Authentication By Password
192https://api.plugg.to/oauth/token
193Use this method if yor application is connecting to Pluggto and have just one user or you know who your user is
194
195To get a access_token from plugin authetication method you need 4 credencials.
196
197
198client_id - Plugin API id
199client_secret - Plugin API password
200username - User API key
201password - User API password
202
203IMPORTANT Be aware that all this credencials are exclusive to connect to the API, and not to use access the PluggTo panel
204HEADERS
205Content-Typeapplication/x-www-form-urlencoded
206BODY raw
207grant_type=password&client_id=[client_id]&client_secret=[client_secret]&username=[app_user]&password=[app_password]
208
209
210Example Request
211Authentication By Password
212curl --location --request POST "https://api.plugg.to/oauth/token" \
213 --header "Content-Type: application/x-www-form-urlencoded" \
214 --data "grant_type=password&client_id=[client_id]&client_secret=[client_secret]&username=[app_user]&password=[app_password]"
215POST Authentication by authorization_code (App)
216https://api.plugg.to/oauth/token
217Use this method if you want that your application oppened inside PluggTo
218
219When create an APP in Pluggto you will register a URL that all users will be redirect when they click your application.
220
221In the URL we will gonna send a parameter called "pluggtocode" that you should access an send to our API with your "client_id" and "client_secreat", passing it as the parameter "code". This code is valid only for the first called, or few minutes, and will give as return the user access_token and refresh_token that you should keep in your database.
222
223To get a access_token from plugin authetication method you need 3 credencials.
224
225
226client_id - Plugin API id
227client_secret - Plugin API password
228code - Pluggtocode parameter passed on the url
229When using the ENDPOINT "users" will allow you to know the user who is acessing your application.
230
231Once that you have the refresh_token will be possible to authenticate next time by refresh_token method.
232
233HEADERS
234Content-Typeapplication/x-www-form-urlencoded
235BODY raw
236grant_type=authorization_code&client_id={client_id}&client_secret={client_secret}&code={pluggtocode}
237
238
239Example Request
240Authentication by authorization_code (App)
241curl --location --request POST "https://api.plugg.to/oauth/token" \
242 --header "Content-Type: application/x-www-form-urlencoded" \
243 --data "grant_type=authorization_code&client_id={client_id}&client_secret={client_secret}&code={pluggtocode}"
244POST Authentication By Refresh Token
245https://api.plugg.to/oauth/token
246This is a second part authentiction. this method if you already have been authenticate the API and already have a refresh_token valid
247
248To get a access_token from plugin authetication method you need 3 credencials.
249
250
251client_id - Plugin API id
252client_secret - Plugin API password
253refresh_token - RefreshToken Keeped
254
255IMPORTANT Every time that you authenticatea new refresh_token is generate that is valid for just few calls, you must keep in your database.
256HEADERS
257Content-Typeapplication/x-www-form-urlencoded
258BODY raw
259grant_type=refresh_token&client_id=[client_id]&client_secret=[client_secret]&refresh_token=[refresh_token_keeped]
260
261
262Example Request
263Authentication By Refresh Token
264curl --location --request POST "https://api.plugg.to/oauth/token" \
265 --header "Content-Type: application/x-www-form-urlencoded" \
266 --data "grant_type=refresh_token&client_id=[client_id]&client_secret=[client_secret]&refresh_token=[refresh_token_keeped]"
267Notifications/Webhook
268
269
270PluggTo sends notifications to your app or plugin to you easy know when a product or orders was created or modified on PluggTo
271
272Notifications are send as POST with a Json message to an URL previusly register in PluggTo in the moment that you have created your Application or Plugin
273
274You going to receive in the menssage the user_id of the resource owner, the resource type (products or orders), the resource id that has changed and the action ("created" or "updated")
275
276The post will be send in the following format:
277
278{"type":"PRODUCTS/SKUS/ORDERS","id":"PLUGGTO_ID","action":"UPDATEORCREATE","user":1120, "changes" : {"status" : false,"stock" : false,"price":false }}
279
280Exemple:
281
282{ "user" : 129, "id" : "5b9169c309eacd415056aa3a", "changes" : { "status" : false, "stock" : false, "price" : false }, "type" : "products", "action" : "updated" }
283
284Important:
285
286PluggTo expecteds a 200 code return, to kwnow that your application has received the menssage, if PluggTo do not receive the 200 code, the menssage will to a retry queue
287
288Retry intervals:
289
2905 minutes
29115 minutes
2921 hour
2932 hours
2943 hours
29512 hours
29624 hours
2972 days (then if yeat do not get yet 200 code, the notification will be discarded
298
299
300
301Orders
302
303POST Create Order
304https://api.plugg.to/orders?access_token={ACCESS_TOKEN}
305Order Status
306
307'pending' - Order is not paid
308'partial_payment' - Order is paid, but freight not
309'approved' - Order is paid and approved
310'waiting_invoice' - Store request to generate Invoice
311'invoice_error' - ERP was not able generate the Invoice
312'invoiced' - Invoice is done
313'shipping_informed' - Store informed the track code and shipped the product
314'shipped' - MarketPlace accept the shipping information and informed de customer
315'shipping_error' - MarketPlace not accept the shipping information, need to fix the invoice information
316'delivered' - Store market as delivered to the customer the product
317'canceled' - The order was canceled
318'under_review' - The order should not be send, untile the MarketPlace approved again the order
319
320
321Status Rules
322
323Order cannot rollback to smaller state (ie. Approved order cannot be mark as Pending, Shipped Order Cannot be Mark as Approved or Pending....
324In any time, an Order CAN be mark as Canceled
325An Delivered Order can Only be mark as Canceled
326HEADERS
327Content-Typeapplication/json
328PARAMS
329access_token{ACCESS_TOKEN}
330BODY raw
331{
332 "receiver_name":"Andre",
333 "receiver_lastname":"Teste2",
334 "receiver_address_number":"440",
335 "receiver_address":"Rua do Bosque",
336 "receiver_address_complement":"Ap 22",
337 "receiver_address_reference":"Prox a padaria",
338 "receiver_city": "São Paulo",
339 "receiver_state":"SP",
340 "receiver_email":"teste@teste.com.br",
341 "receiver_zipcode":"4457-115",
342 "receiver_phone":"9911-22111",
343 "receiver_phone2_area":"21",
344 "receiver_phone2":"9911-22112",
345 "receiver_neighborhood": "Barra funda",
346 "receiver_phone_area":"11",
347 "payer_name":"Luizo",
348 "payer_lastname":"Santos",
349 "payer_address":"Rua do Bosque",
350 "payer_address_number": "440",
351 "payer_address_complement":"Ap 22",
352 "payer_additional_info":"Prox a padaria",
353 "payer_neighborhood": "Mooca",
354 "payer_city": "São Paulo",
355 "payer_state": "SP",
356 "payer_zipcode":"4457-115",
357 "payer_phone_area":"11",
358 "payer_phone":"2233-1111",
359 "payer_phone2_area":"21",
360 "payer_phone2":"2233-1111",
361 "payer_cpf": "000.000.000-00",
362 "payer_tax_id":"000.000.000-00",
363 "payer_cnpj": "22.211.221/0001-21",
364 "payer_document":"22.211.221/0001-21",
365 "payer_razao_social": "EMPRESA LTDA",
366 "payer_company_name":"EMPRESA LTDA",
367 "payer_country": "BR",
368 "payer_email": "999999992016@mail.com.br",
369 "total_paid": "18",
370 "payer_gender": "male|female|n/a",
371 "shipping": 10.21,
372 "subtotal": 18.21,
373 "discount": 0.0,
374 "total": 18,
375 "payment_installments":3,
376 "user_client_id":"129",
377 "status": "pending",
378 "original_id": "id_2_no_meu_sistema",
379 "expected_send_date":"2016-11-05",
380 "expected_delivery_date":"2016-11-05",
381 "receiver_schedule_date":"2016-11-05",
382 "receiver_schedule_period":"morning|afternoon|night",
383 "stock_code":"warehouse_1",
384 "price_code":"price_reseller",
385 "payments":[{
386 "payment_type":"credit",
387 "payment_method":"Nome do método como enviado pelo canal de venda",
388 "payment_installments":3,
389 "payment_total":100,
390 "payment_quota":30,
391 "payment_interest":3
392 }],
393 "shipments":[{
394 "shipping_company":"Correios",
395 "shipping_method":"PAC",
396 "track_code":"11111",
397 "track_url":"http://correios.com.br",
398 "status":"shipped|delivered|issue",
399 "estimate_delivery_date":"2016-11-05",
400 "date_shipped":"2016-11-01",
401 "date_delivered":"2016-11-05",
402 "date_cancelled":"2016-12-01",
403 "nfe_key":"44444444444444444444444444444",
404 "nfe_link":"http://nfe.com.br/nsaasa",
405 "nfe_number":"12",
406 "nfe_serie":"1",
407 "nfe_date":"2016-11-01",
408 "cfops":"String com todos CFOPs do pedido",
409 "documents":
410 [
411 {
412 "url":"http://www.etiqueta.com.br",
413 "external":"http://www.etiqueta.com.br",
414 "type":"label|packing_list|invoice"
415 }
416 ],
417 "issues":[
418 {
419 "description":"Atrasa na entrega",
420 "date":"2016-11-04"
421 }
422 ],
423 "shipping_items":
424 [
425 {
426 "sku":"136-CT997",
427 "quantity":1
428 },
429 {
430 "sku":"136-D0004",
431 "quantity":5
432 },
433 {
434 "sku":"136-D0002",
435 "quantity":5
436 }
437 ]
438 }],
439 "items": [
440
441 { "quantity": 3,
442 "sku": "136-ED021",
443 "price": 30,
444 "total": 90,
445 "name": "Camiseta Básica Azul",
446 "stock_code": "136",
447 "commission":{
448 "fixed":4,
449 "tax":2,
450 "total_charged":10
451 },
452 "variation": {
453 "sku": "variacao-1"
454 },
455 "supplier_id":"136"
456 },
457 { "quantity": 1,
458 "sku": "XYZ",
459 "price": 10,
460 "total": 10,
461 "name": "PRODUTO XYZ",
462 "supplier_id":"136",
463 "commission":{
464 "fixed":4,
465 "tax":2,
466 "total_charged":10
467 }
468
469 },
470 { "quantity": 1,
471 "sku": "151-variacao123",
472 "price": 100,
473 "total": 100,
474 "name": "Produto de teste com variacao",
475 "stock_code": "151",
476 "supplier_id":"136",
477 "variation": {
478 "sku": "151-sapp-1"
479 },
480 "commission":{
481 "fixed":4,
482 "tax":2,
483 "total_charged":10
484 }
485 }
486 ]
487}
488
489
490Example Request
491Create Order
492curl --location --request POST "https://api.plugg.to/orders?access_token=%7BACCESS_TOKEN%7D" \
493 --header "Content-Type: application/json" \
494 --data "{
495 \"receiver_name\":\"Andre\",
496 \"receiver_lastname\":\"Teste2\",
497 \"receiver_address_number\":\"440\",
498 \"receiver_address\":\"Rua do Bosque\",
499 \"receiver_address_complement\":\"Ap 22\",
500 \"receiver_address_reference\":\"Prox a padaria\",
501 \"receiver_city\": \"São Paulo\",
502 \"receiver_state\":\"SP\",
503 \"receiver_email\":\"teste@teste.com.br\",
504 \"receiver_zipcode\":\"4457-115\",
505 \"receiver_phone\":\"9911-22111\",
506 \"receiver_phone2_area\":\"21\",
507 \"receiver_phone2\":\"9911-22112\",
508 \"receiver_neighborhood\": \"Barra funda\",
509 \"receiver_phone_area\":\"11\",
510 \"payer_name\":\"Luizo\",
511 \"payer_lastname\":\"Santos\",
512 \"payer_address\":\"Rua do Bosque\",
513 \"payer_address_number\": \"440\",
514 \"payer_address_complement\":\"Ap 22\",
515 \"payer_additional_info\":\"Prox a padaria\",
516 \"payer_neighborhood\": \"Mooca\",
517 \"payer_city\": \"São Paulo\",
518 \"payer_state\": \"SP\",
519 \"payer_zipcode\":\"4457-115\",
520 \"payer_phone_area\":\"11\",
521 \"payer_phone\":\"2233-1111\",
522 \"payer_phone2_area\":\"21\",
523 \"payer_phone2\":\"2233-1111\",
524 \"payer_cpf\": \"000.000.000-00\",
525 \"payer_tax_id\":\"000.000.000-00\",
526 \"payer_cnpj\": \"22.211.221/0001-21\",
527 \"payer_document\":\"22.211.221/0001-21\",
528 \"payer_razao_social\": \"EMPRESA LTDA\",
529 \"payer_company_name\":\"EMPRESA LTDA\",
530 \"payer_country\": \"BR\",
531 \"payer_email\": \"999999992016@mail.com.br\",
532 \"total_paid\": \"18\",
533 \"payer_gender\": \"male|female|n/a\",
534 \"shipping\": 10.21,
535 \"subtotal\": 18.21,
536 \"discount\": 0.0,
537 \"total\": 18,
538 \"payment_installments\":3,
539 \"user_client_id\":\"129\",
540 \"status\": \"pending\",
541 \"original_id\": \"id_2_no_meu_sistema\",
542 \"expected_send_date\":\"2016-11-05\",
543 \"expected_delivery_date\":\"2016-11-05\",
544 \"receiver_schedule_date\":\"2016-11-05\",
545 \"receiver_schedule_period\":\"morning|afternoon|night\",
546 \"stock_code\":\"warehouse_1\",
547 \"price_code\":\"price_reseller\",
548 \"payments\":[{
549 \"payment_type\":\"credit\",
550 \"payment_method\":\"Nome do método como enviado pelo canal de venda\",
551 \"payment_installments\":3,
552 \"payment_total\":100,
553 \"payment_quota\":30,
554 \"payment_interest\":3
555 }],
556 \"shipments\":[{
557 \"shipping_company\":\"Correios\",
558 \"shipping_method\":\"PAC\",
559 \"track_code\":\"11111\",
560 \"track_url\":\"http://correios.com.br\",
561 \"status\":\"shipped|delivered|issue\",
562 \"estimate_delivery_date\":\"2016-11-05\",
563 \"date_shipped\":\"2016-11-01\",
564 \"date_delivered\":\"2016-11-05\",
565 \"date_cancelled\":\"2016-12-01\",
566 \"nfe_key\":\"44444444444444444444444444444\",
567 \"nfe_link\":\"http://nfe.com.br/nsaasa\",
568 \"nfe_number\":\"12\",
569 \"nfe_serie\":\"1\",
570 \"nfe_date\":\"2016-11-01\",
571 \"cfops\":\"String com todos CFOPs do pedido\",
572 \"documents\":
573 [
574 {
575 \"url\":\"http://www.etiqueta.com.br\",
576 \"external\":\"http://www.etiqueta.com.br\",
577 \"type\":\"label|packing_list|invoice\"
578 }
579 ],
580 \"issues\":[
581 {
582 \"description\":\"Atrasa na entrega\",
583 \"date\":\"2016-11-04\"
584 }
585 ],
586 \"shipping_items\":
587 [
588 {
589 \"sku\":\"136-CT997\",
590 \"quantity\":1
591 },
592 {
593 \"sku\":\"136-D0004\",
594 \"quantity\":5
595 },
596 {
597 \"sku\":\"136-D0002\",
598 \"quantity\":5
599 }
600 ]
601 }],
602 \"items\": [
603
604 { \"quantity\": 3,
605 \"sku\": \"136-ED021\",
606 \"price\": 30,
607 \"total\": 90,
608 \"name\": \"Camiseta Básica Azul\",
609 \"stock_code\": \"136\",
610 \"commission\":{
611 \"fixed\":4,
612 \"tax\":2,
613 \"total_charged\":10
614 },
615 \"variation\": {
616 \"sku\": \"variacao-1\"
617 },
618 \"supplier_id\":\"136\"
619 },
620 { \"quantity\": 1,
621 \"sku\": \"XYZ\",
622 \"price\": 10,
623 \"total\": 10,
624 \"name\": \"PRODUTO XYZ\",
625 \"supplier_id\":\"136\",
626 \"commission\":{
627 \"fixed\":4,
628 \"tax\":2,
629 \"total_charged\":10
630 }
631
632 },
633 { \"quantity\": 1,
634 \"sku\": \"151-variacao123\",
635 \"price\": 100,
636 \"total\": 100,
637 \"name\": \"Produto de teste com variacao\",
638 \"stock_code\": \"151\",
639 \"supplier_id\":\"136\",
640 \"variation\": {
641 \"sku\": \"151-sapp-1\"
642 },
643 \"commission\":{
644 \"fixed\":4,
645 \"tax\":2,
646 \"total_charged\":10
647 }
648 }
649 ]
650}"
651GET Get one Order
652https://api.plugg.to/orders/{plugg_order_id}?access_token={access_token}
653HEADERS
654Content-Typeapplication/json
655PARAMS
656access_token{access_token}
657BODY raw
658{
659 "receiver_name":"Andre",
660 "receiver_lastname":"Teste",
661 "receiver_address_number":"440",
662 "receiver_address":"Rua do Bosque",
663 "receiver_address_complement":"Ap 22",
664 "receiver_address_reference":"Prox a padaria",
665 "receiver_city": "São Paulo",
666 "receiver_state":"SP",
667 "receiver_email":"teste@teste.com.br",
668 "receiver_zipcode":"4457-115",
669 "receiver_phone":"9911-22111",
670 "receiver_phone2_area":"21",
671 "receiver_phone2":"9911-22112",
672 "receiver_neighborhood": "Barra funda",
673 "receiver_phone_area":"11",
674 "payer_name":"Luizo",
675 "payer_lastname":"Santos",
676 "payer_address":"Rua do Bosque",
677 "payer_address_number": "440",
678 "payer_address_complement":"Ap 22",
679 "payer_additional_info":"Prox a padaria",
680 "payer_neighborhood": "Mooca",
681 "payer_city": "São Paulo",
682 "payer_state": "SP",
683 "payer_zipcode":"4457-115",
684 "payer_phone_area":"11",
685 "payer_phone":"2233-1111",
686 "payer_phone2_area":"21",
687 "payer_phone2":"2233-1111",
688 "payer_cpf": "000.000.000-00",
689 "payer_cnpj": "22.211.221/0001-21",
690 "payer_razao_social": "EMPRESA LTDA",
691 "payer_country": "BR",
692 "payer_email": "999999992016@mail.com.br",
693 "total_paid": "18",
694 "payer_gender": "male",
695 "shipping": 10.21,
696 "subtotal": 18.21,
697 "discount": 0.0,
698 "total": 18,
699 "payment_installments":3,
700 "payment_method":"visa",
701 "user_client_id":"129",
702 "status": "pending",
703 "external": "53453543534353",
704 "delivery_type": "standard",
705 "channel": "minha_aplicacao",
706 "currency":"BRL",
707 "original_id": "id_2_no_meu_sistema",
708 "espected_delivery_date":"2016-11-05",
709 "receiver_schedule_date":"2016-11-05",
710 "receiver_schedule_period":"morning",
711 "stock_code":"warehouse_1",
712 "price_code":"price_reseller",
713 "shipments":[{
714 "shipping_company":"Correios",
715 "shipping_method":"PAC",
716 "track_code":"11111",
717 "track_url":"http://correios.com.br",
718 "status":"shipped",
719 "estimate_delivery_date":"2016-11-05",
720 "date_shipped":"2016-11-01",
721 "date_delivered":"2016-11-05",
722 "date_cancelled":"2016-12-01",
723 "nfe_key":"44444444444444444444444444444",
724 "nfe_link":"http://nfe.com.br/nsaasa",
725 "nfe_number":"12",
726 "nfe_serie":"1",
727 "nfe_date":"2016-11-01",
728 "issues":[
729 {
730 "description":"Atrasa na entrega",
731 "date":"2016-11-04"
732 }
733 ],
734 "shipping_items":
735 [
736 {
737 "sku":"136-CT997",
738 "quantity":1
739 },
740 {
741 "sku":"136-D0004",
742 "quantity":5
743 },
744 {
745 "sku":"136-D0002",
746 "quantity":5
747 }
748 ]
749 }],
750 "items": [{
751 "quantity": 1,
752 "sku": "136-CT997",
753 "price": "90",
754 "total": "90",
755 "name": "Camiseta Básica Azul"
756 },
757 {
758 "quantity": 5,
759 "sku": "136-D0004",
760 "price": "90",
761 "total": "90",
762 "name": "Camiseta Básica Azul"
763 },
764 {
765 "quantity": 5,
766 "sku": "136-D0002",
767 "price": "90",
768 "total": "90",
769 "name": "Camiseta Básica Azul"
770 }]
771}
772
773
774Example Request
775Get one Order
776curl --location --request GET "https://api.plugg.to/orders/%7Bplugg_order_id%7D?access_token=%7Baccess_token%7D" \
777 --header "Content-Type: application/json" \
778 --data "{
779 \"receiver_name\":\"Andre\",
780 \"receiver_lastname\":\"Teste\",
781 \"receiver_address_number\":\"440\",
782 \"receiver_address\":\"Rua do Bosque\",
783 \"receiver_address_complement\":\"Ap 22\",
784 \"receiver_address_reference\":\"Prox a padaria\",
785 \"receiver_city\": \"São Paulo\",
786 \"receiver_state\":\"SP\",
787 \"receiver_email\":\"teste@teste.com.br\",
788 \"receiver_zipcode\":\"4457-115\",
789 \"receiver_phone\":\"9911-22111\",
790 \"receiver_phone2_area\":\"21\",
791 \"receiver_phone2\":\"9911-22112\",
792 \"receiver_neighborhood\": \"Barra funda\",
793 \"receiver_phone_area\":\"11\",
794 \"payer_name\":\"Luizo\",
795 \"payer_lastname\":\"Santos\",
796 \"payer_address\":\"Rua do Bosque\",
797 \"payer_address_number\": \"440\",
798 \"payer_address_complement\":\"Ap 22\",
799 \"payer_additional_info\":\"Prox a padaria\",
800 \"payer_neighborhood\": \"Mooca\",
801 \"payer_city\": \"São Paulo\",
802 \"payer_state\": \"SP\",
803 \"payer_zipcode\":\"4457-115\",
804 \"payer_phone_area\":\"11\",
805 \"payer_phone\":\"2233-1111\",
806 \"payer_phone2_area\":\"21\",
807 \"payer_phone2\":\"2233-1111\",
808 \"payer_cpf\": \"000.000.000-00\",
809 \"payer_cnpj\": \"22.211.221/0001-21\",
810 \"payer_razao_social\": \"EMPRESA LTDA\",
811 \"payer_country\": \"BR\",
812 \"payer_email\": \"999999992016@mail.com.br\",
813 \"total_paid\": \"18\",
814 \"payer_gender\": \"male\",
815 \"shipping\": 10.21,
816 \"subtotal\": 18.21,
817 \"discount\": 0.0,
818 \"total\": 18,
819 \"payment_installments\":3,
820 \"payment_method\":\"visa\",
821 \"user_client_id\":\"129\",
822 \"status\": \"pending\",
823 \"external\": \"53453543534353\",
824 \"delivery_type\": \"standard\",
825 \"channel\": \"minha_aplicacao\",
826 \"currency\":\"BRL\",
827 \"original_id\": \"id_2_no_meu_sistema\",
828 \"espected_delivery_date\":\"2016-11-05\",
829 \"receiver_schedule_date\":\"2016-11-05\",
830 \"receiver_schedule_period\":\"morning\",
831 \"stock_code\":\"warehouse_1\",
832 \"price_code\":\"price_reseller\",
833 \"shipments\":[{
834 \"shipping_company\":\"Correios\",
835 \"shipping_method\":\"PAC\",
836 \"track_code\":\"11111\",
837 \"track_url\":\"http://correios.com.br\",
838 \"status\":\"shipped\",
839 \"estimate_delivery_date\":\"2016-11-05\",
840 \"date_shipped\":\"2016-11-01\",
841 \"date_delivered\":\"2016-11-05\",
842 \"date_cancelled\":\"2016-12-01\",
843 \"nfe_key\":\"44444444444444444444444444444\",
844 \"nfe_link\":\"http://nfe.com.br/nsaasa\",
845 \"nfe_number\":\"12\",
846 \"nfe_serie\":\"1\",
847 \"nfe_date\":\"2016-11-01\",
848 \"issues\":[
849 {
850 \"description\":\"Atrasa na entrega\",
851 \"date\":\"2016-11-04\"
852 }
853 ],
854 \"shipping_items\":
855 [
856 {
857 \"sku\":\"136-CT997\",
858 \"quantity\":1
859 },
860 {
861 \"sku\":\"136-D0004\",
862 \"quantity\":5
863 },
864 {
865 \"sku\":\"136-D0002\",
866 \"quantity\":5
867 }
868 ]
869 }],
870 \"items\": [{
871 \"quantity\": 1,
872 \"sku\": \"136-CT997\",
873 \"price\": \"90\",
874 \"total\": \"90\",
875 \"name\": \"Camiseta Básica Azul\"
876 },
877 {
878 \"quantity\": 5,
879 \"sku\": \"136-D0004\",
880 \"price\": \"90\",
881 \"total\": \"90\",
882 \"name\": \"Camiseta Básica Azul\"
883 },
884 {
885 \"quantity\": 5,
886 \"sku\": \"136-D0002\",
887 \"price\": \"90\",
888 \"total\": \"90\",
889 \"name\": \"Camiseta Básica Azul\"
890 }]
891}"
892PUT Update Order
893https://api.plugg.to/orders/5877efb70280833e402e54bc?access_token=23b2bd1d1b73fa42506bd4c9f2c3223414d9d3af
894Method to update order.
895
896Your system must create a shippiment with status "invoiced", when sending invoice data.
897
898Your system must create a shippiment with status "shipping_informed", when sending shipment data.
899
900Attention:The "shipped" status is register by Pluggto when we have success to send the information to the MarketPlace, while in case of unsuccess we mark the order with the status "shipping_error".
901
902In case of "invoiced" or "shipping_informed". If you change just the status order withou send the information, this status will not be update on the Marketplace.
903
904I case of status "canceled", not all Marketplace accept to cancel orders by API check with our team if this update will be reflected on a specific marketplace
905
906If alreay exists one shipment created in the order, is necessary to send the field "id" that return from our API, otherwise you will create a new shipment.
907
908Exemple:
909
910{
911"status":"shipping_informed",
912"shipments":
913 [{"id":"32132311311",
914"shipping_company":"Correios",
915"shipping_method":"PAC",
916"track_code":"11111",
917"track_url":"http://correios.com.br",
918"status":"shipped",
919"date_shipped":"2016-11-01",
920"nfe_key":"44444444444444444444444444444",
921"nfe_link":"http://nfe.com.br/nsaasa",
922"nfe_number":"12",
923"nfe_serie":"1",
924"nfe_date":"2016-11-01"
925}]
926}
927
928HEADERS
929Content-Typeapplication/json
930PARAMS
931access_token23b2bd1d1b73fa42506bd4c9f2c3223414d9d3af
932BODY raw
933{
934 "receiver_name":"Andre",
935 "receiver_lastname":"Teste",
936 "receiver_address_number":"440",
937 "receiver_address":"Rua do Bosque",
938 "receiver_address_complement":"Ap 22",
939 "receiver_address_reference":"Prox a padaria",
940 "receiver_city": "São Paulo",
941 "receiver_state":"SP",
942 "receiver_email":"teste@teste.com.br",
943 "receiver_zipcode":"4457-115",
944 "receiver_phone":"9911-22111",
945 "receiver_phone2_area":"21",
946 "receiver_phone2":"9911-22112",
947 "receiver_neighborhood": "Barra funda",
948 "receiver_phone_area":"11",
949 "payer_name":"Luizo",
950 "payer_lastname":"Santos",
951 "payer_address":"Rua do Bosque",
952 "payer_address_number": "440",
953 "payer_address_complement":"Ap 22",
954 "payer_additional_info":"Prox a padaria",
955 "payer_neighborhood": "Mooca",
956 "payer_city": "São Paulo",
957 "payer_state": "SP",
958 "payer_zipcode":"4457-115",
959 "payer_phone_area":"11",
960 "payer_phone":"2233-1111",
961 "payer_phone2_area":"21",
962 "payer_phone2":"2233-1111",
963 "payer_cpf": "000.000.000-00",
964 "payer_tax_id":"000.000.000-00",
965 "payer_cnpj": "22.211.221/0001-21",
966 "payer_document":"22.211.221/0001-21",
967 "payer_razao_social": "EMPRESA LTDA",
968 "payer_company_name":"EMPRESA LTDA",
969 "payer_country": "BR",
970 "payer_email": "999999992016@mail.com.br",
971 "total_paid": "18",
972 "payer_gender": "male",
973 "shipping": 10.21,
974 "subtotal": 18.21,
975 "discount": 0.0,
976 "total": 18,
977 "payment_installments":3,
978 "user_client_id":"129",
979 "status": "pending|partial_payment|approved|waiting_invoice|invoiced|partial_invoiced|invoice_error|shipping_informed|shipped|partial_shipped|shipping_error|delivered|partial_delivered|canceled|under_review",
980 "external": "53453543534353",
981 "delivery_type": "standard",
982 "channel": "minha_aplicacao",
983 "currency":"BRL|ARS|VEF|MXN|MXV|MCR|COP|BOB|ARS|EUR|UYU|CAD|CLP|CRC|PYG|PEN|PAB|GBP|AUD|CUP|CUC|USD",
984 "original_id": "id_2_no_meu_sistema",
985 "expected_send_date":"2016-11-05",
986 "expected_delivery_date":"2016-11-05",
987 "receiver_schedule_date":"2016-11-05",
988 "receiver_schedule_period":"morning",
989 "stock_code":"warehouse_1",
990 "price_code":"price_reseller",
991 "shipments":[{
992 "id":"SEND_INTERNAL_ID_TO_UPDATE_SHIPMENT_NOT_SEND_THIS_FIELD_TO_CREATE_A_NEW_SHIPMENT",
993 "shipping_company":"Correios",
994 "shipping_method":"PAC",
995 "track_code":"11111",
996 "track_url":"http://correios.com.br",
997 "status":"shipped|delivered|issue",
998 "estimate_delivery_date":"2016-11-05",
999 "date_shipped":"2016-11-01",
1000 "date_delivered":"2016-11-05",
1001 "date_cancelled":"2016-12-01",
1002 "nfe_key":"44444444444444444444444444444",
1003 "nfe_link":"http://nfe.com.br/nsaasa",
1004 "nfe_number":"12",
1005 "nfe_serie":"1",
1006 "nfe_date":"2016-11-01",
1007 "cfops":"String com todos CFOPs do pedido",
1008 "documents":
1009 [
1010 {
1011 "url":"http://www.etiqueta.com.br",
1012 "external":"http://www.etiqueta.com.br",
1013 "type":"label|packing_list|invoice"
1014 }
1015 ],
1016 "issues":[
1017 {
1018 "description":"Atrasa na entrega",
1019 "date":"2016-11-04"
1020 }
1021 ],
1022 "shipping_items":
1023 [
1024 {
1025 "sku":"136-CT997",
1026 "quantity":1
1027 },
1028 {
1029 "sku":"136-D0004",
1030 "quantity":5
1031 },
1032 {
1033 "sku":"136-D0002",
1034 "quantity":5
1035 }
1036 ]
1037 }],
1038 "items": [{
1039 "quantity": 1,
1040 "sku": "136-CT997",
1041 "price": "90",
1042 "total": "90",
1043 "name": "Camiseta Básica Azul"
1044 },
1045 {
1046 "quantity": 5,
1047 "sku": "136-D0004",
1048 "price": "90",
1049 "total": "90",
1050 "name": "Camiseta Básica Azul"
1051 },
1052 {
1053 "quantity": 5,
1054 "sku": "136-D0002",
1055 "price": "90",
1056 "total": "90",
1057 "name": "Camiseta Básica Azul"
1058 }]
1059}
1060
1061
1062Example Request
1063Update Order
1064curl --location --request PUT "https://api.plugg.to/orders/5877efb70280833e402e54bc?access_token=23b2bd1d1b73fa42506bd4c9f2c3223414d9d3af" \
1065 --header "Content-Type: application/json" \
1066 --data "{
1067 \"receiver_name\":\"Andre\",
1068 \"receiver_lastname\":\"Teste\",
1069 \"receiver_address_number\":\"440\",
1070 \"receiver_address\":\"Rua do Bosque\",
1071 \"receiver_address_complement\":\"Ap 22\",
1072 \"receiver_address_reference\":\"Prox a padaria\",
1073 \"receiver_city\": \"São Paulo\",
1074 \"receiver_state\":\"SP\",
1075 \"receiver_email\":\"teste@teste.com.br\",
1076 \"receiver_zipcode\":\"4457-115\",
1077 \"receiver_phone\":\"9911-22111\",
1078 \"receiver_phone2_area\":\"21\",
1079 \"receiver_phone2\":\"9911-22112\",
1080 \"receiver_neighborhood\": \"Barra funda\",
1081 \"receiver_phone_area\":\"11\",
1082 \"payer_name\":\"Luizo\",
1083 \"payer_lastname\":\"Santos\",
1084 \"payer_address\":\"Rua do Bosque\",
1085 \"payer_address_number\": \"440\",
1086 \"payer_address_complement\":\"Ap 22\",
1087 \"payer_additional_info\":\"Prox a padaria\",
1088 \"payer_neighborhood\": \"Mooca\",
1089 \"payer_city\": \"São Paulo\",
1090 \"payer_state\": \"SP\",
1091 \"payer_zipcode\":\"4457-115\",
1092 \"payer_phone_area\":\"11\",
1093 \"payer_phone\":\"2233-1111\",
1094 \"payer_phone2_area\":\"21\",
1095 \"payer_phone2\":\"2233-1111\",
1096 \"payer_cpf\": \"000.000.000-00\",
1097 \"payer_tax_id\":\"000.000.000-00\",
1098 \"payer_cnpj\": \"22.211.221/0001-21\",
1099 \"payer_document\":\"22.211.221/0001-21\",
1100 \"payer_razao_social\": \"EMPRESA LTDA\",
1101 \"payer_company_name\":\"EMPRESA LTDA\",
1102 \"payer_country\": \"BR\",
1103 \"payer_email\": \"999999992016@mail.com.br\",
1104 \"total_paid\": \"18\",
1105 \"payer_gender\": \"male\",
1106 \"shipping\": 10.21,
1107 \"subtotal\": 18.21,
1108 \"discount\": 0.0,
1109 \"total\": 18,
1110 \"payment_installments\":3,
1111 \"user_client_id\":\"129\",
1112 \"status\": \"pending|partial_payment|approved|waiting_invoice|invoiced|partial_invoiced|invoice_error|shipping_informed|shipped|partial_shipped|shipping_error|delivered|partial_delivered|canceled|under_review\",
1113 \"external\": \"53453543534353\",
1114 \"delivery_type\": \"standard\",
1115 \"channel\": \"minha_aplicacao\",
1116 \"currency\":\"BRL|ARS|VEF|MXN|MXV|MCR|COP|BOB|ARS|EUR|UYU|CAD|CLP|CRC|PYG|PEN|PAB|GBP|AUD|CUP|CUC|USD\",
1117 \"original_id\": \"id_2_no_meu_sistema\",
1118 \"expected_send_date\":\"2016-11-05\",
1119 \"expected_delivery_date\":\"2016-11-05\",
1120 \"receiver_schedule_date\":\"2016-11-05\",
1121 \"receiver_schedule_period\":\"morning\",
1122 \"stock_code\":\"warehouse_1\",
1123 \"price_code\":\"price_reseller\",
1124 \"shipments\":[{
1125 \"id\":\"SEND_INTERNAL_ID_TO_UPDATE_SHIPMENT_NOT_SEND_THIS_FIELD_TO_CREATE_A_NEW_SHIPMENT\",
1126 \"shipping_company\":\"Correios\",
1127 \"shipping_method\":\"PAC\",
1128 \"track_code\":\"11111\",
1129 \"track_url\":\"http://correios.com.br\",
1130 \"status\":\"shipped|delivered|issue\",
1131 \"estimate_delivery_date\":\"2016-11-05\",
1132 \"date_shipped\":\"2016-11-01\",
1133 \"date_delivered\":\"2016-11-05\",
1134 \"date_cancelled\":\"2016-12-01\",
1135 \"nfe_key\":\"44444444444444444444444444444\",
1136 \"nfe_link\":\"http://nfe.com.br/nsaasa\",
1137 \"nfe_number\":\"12\",
1138 \"nfe_serie\":\"1\",
1139 \"nfe_date\":\"2016-11-01\",
1140 \"cfops\":\"String com todos CFOPs do pedido\",
1141 \"documents\":
1142 [
1143 {
1144 \"url\":\"http://www.etiqueta.com.br\",
1145 \"external\":\"http://www.etiqueta.com.br\",
1146 \"type\":\"label|packing_list|invoice\"
1147 }
1148 ],
1149 \"issues\":[
1150 {
1151 \"description\":\"Atrasa na entrega\",
1152 \"date\":\"2016-11-04\"
1153 }
1154 ],
1155 \"shipping_items\":
1156 [
1157 {
1158 \"sku\":\"136-CT997\",
1159 \"quantity\":1
1160 },
1161 {
1162 \"sku\":\"136-D0004\",
1163 \"quantity\":5
1164 },
1165 {
1166 \"sku\":\"136-D0002\",
1167 \"quantity\":5
1168 }
1169 ]
1170 }],
1171 \"items\": [{
1172 \"quantity\": 1,
1173 \"sku\": \"136-CT997\",
1174 \"price\": \"90\",
1175 \"total\": \"90\",
1176 \"name\": \"Camiseta Básica Azul\"
1177 },
1178 {
1179 \"quantity\": 5,
1180 \"sku\": \"136-D0004\",
1181 \"price\": \"90\",
1182 \"total\": \"90\",
1183 \"name\": \"Camiseta Básica Azul\"
1184 },
1185 {
1186 \"quantity\": 5,
1187 \"sku\": \"136-D0002\",
1188 \"price\": \"90\",
1189 \"total\": \"90\",
1190 \"name\": \"Camiseta Básica Azul\"
1191 }]
1192}"
1193GET Get All Orders
1194https://api.plugg.to/orders?access_token={access_token}&next={last_pluggto_id}&limit=100
1195From this endpoint is possible to get all orders from PluggTo.
1196
1197Paging
1198next Insert the last id found in the previus call
1199limit Insert the number or registers to be returned
1200Filters
1201created Check from creation date (ie 2017-01-01to2017-02-01)
1202modified Check from update date. (ie 2017-01-01to2017-02-01)
1203sku Search orders that contains this sku
1204channel_id Search by original channel id (ie 1231)
1205channel Search by channel name (ie. Mercadolivre)
1206attribute Search by attribute code or attribute value field (exact)
1207nfe_number Search by invoice number
1208has_nfe See if has invoice number
1209track_code Search by track code
1210shipping_company Search by shipping company
1211external Search by your application id
1212ack Show olders that is or not know (ie. ack=1 or ack=0)
1213others you can search by any other api propriety, like "receiver_name=Anny or status=active"
1214HEADERS
1215Content-Typeapplication/json
1216PARAMS
1217access_token{access_token}
1218next{last_pluggto_id}
1219limit100
1220
1221Example Request
1222Get All Orders
1223curl --location --request GET "https://api.plugg.to/orders?access_token=%7Baccess_token%7D&next=%7Blast_pluggto_id%7D&limit=100" \
1224 --header "Content-Type: application/json"
1225Products
1226
1227GET Get one product (by pluggto id)
1228https://api.plugg.to/products/{pluggto_product_id}?access_token={access_token}
1229HEADERS
1230Acceptapplication/json
1231Content-Typeapplication/json
1232PARAMS
1233access_token{access_token}
1234BODY raw
1235{"sku":"pai","name":"Pai","variations":[
1236
1237{"sku":"pai-var1","quantity":2,"price":10.99,"name":"pai var 1",
1238
1239"price_table":[
1240 {"code":"price1","action":"decrease","percentage":10},
1241 {"code":"price2","price":9.99,"special_price":15,"minimum_price":8.00,"action":"overwrite"}
1242 ]
1243
1244},
1245
1246{"sku":"pai-var2","quantity":3,"price":11.99,"name":"pai var 2"},
1247
1248{"sku":"pai-var3","quantity":4,"price":12.99,"name":"pai var 3"},
1249
1250{"sku":"pai-var4","quantity":4,"price":12.99,"name":"pai var 4"}
1251
1252]}
1253
1254
1255Example Request
1256Get one product (by pluggto id)
1257curl --location --request GET "https://api.plugg.to/products/%7Bpluggto_product_id%7D?access_token=%7Baccess_token%7D" \
1258 --header "Accept: application/json" \
1259 --header "Content-Type: application/json" \
1260 --data "{\"sku\":\"pai\",\"name\":\"Pai\",\"variations\":[
1261
1262{\"sku\":\"pai-var1\",\"quantity\":2,\"price\":10.99,\"name\":\"pai var 1\",
1263
1264\"price_table\":[
1265 {\"code\":\"price1\",\"action\":\"decrease\",\"percentage\":10},
1266 {\"code\":\"price2\",\"price\":9.99,\"special_price\":15,\"minimum_price\":8.00,\"action\":\"overwrite\"}
1267 ]
1268
1269},
1270
1271{\"sku\":\"pai-var2\",\"quantity\":3,\"price\":11.99,\"name\":\"pai var 2\"},
1272
1273{\"sku\":\"pai-var3\",\"quantity\":4,\"price\":12.99,\"name\":\"pai var 3\"},
1274
1275{\"sku\":\"pai-var4\",\"quantity\":4,\"price\":12.99,\"name\":\"pai var 4\"}
1276
1277]}"
1278PUT Create or Update a Sku Simple or With Variation
1279https://api.plugg.to/skus/{sku_id}?access_token={access_token}
1280HEADERS
1281Acceptapplication/json
1282Content-Typeapplication/json
1283PARAMS
1284access_token{access_token}
1285BODY raw
1286{"sku":"produto_pai",
1287 "ean":"21313213131",
1288 "ncm":"111",
1289 "name":"Nome do produto pai",
1290 "external":"Codigo_do_produto_pai_no_outro_sistema",
1291 "quantity":2,
1292 "special_price":9.90,
1293 "price":12.45,
1294 "short_description":"Descrição resumida do produto",
1295 "description": "descrição detalada do produto",
1296 "brand":"marca",
1297 "cost":2.21,
1298 "warranty_time":3,
1299 "warranty_message":"3 meses de garantia",
1300 "link":"http://site.com.br/esseproduto",
1301 "available":1,
1302 "categories":[
1303 {"name":"categoria base"},
1304 {"name":"categoria base > subcatgoria"},
1305 {"name":"categoria base > subcatgoria > tipo"},
1306 {"name":"categoria base > outrasubcategoria > outrotipo"}
1307 ],
1308 "handling_time":1,
1309 "manufacture_time":1,
1310 "dimension":{
1311 "length":22,
1312 "width":22,
1313 "height":22,
1314 "weight":22
1315 },
1316 "attributes":
1317 [
1318 {
1319 "code":"gender","label":"Genero","value":{"code":"f","label":"feminino"}
1320 }
1321 ],
1322 "photos":[
1323 {
1324 "url": "http://www.site.com.br/enderecoimagem.jpg",
1325 "name": "imagem 1 do produto",
1326 "title": "imagem 1 do produto",
1327 "order": 1,
1328 "external": "http://www.site.com.br/enderecoimagem.jpg"
1329 },
1330 {
1331 "url": "http://www.site.com.br/enderecoimagem2.jpg",
1332 "name": "imagem 2 do produto",
1333 "title": "imagem 2 do produto",
1334 "order": 2,
1335 "external": "http://www.site.com.br/enderecoimagem.jpg"
1336 }
1337 ],
1338
1339 "price_table":[
1340 {
1341 "code":"reseller",
1342 "label":"Preço para reseller",
1343 "price":5.50,
1344 "special_price":4.32,
1345 "action":"overwrite"
1346 },
1347 {
1348 "code":"mercadolivre",
1349 "label":"Preço para o mercadolivre",
1350 "price":22.50,
1351 "special_price":14.32,
1352 "action":"overwrite"
1353 },
1354 {
1355 "code":"b2w",
1356 "label":"Preço para a b2w",
1357 "action":"increase",
1358 "percentage":10
1359 }
1360 ],
1361"stock_table":[
1362 {
1363 "code":"{YOUR_CODE}",
1364 "type":"{own OR supplier}",
1365 "priority":"{0 is the high priority}",
1366 "quantity":2,
1367 "price":2.22,
1368 "special_price":1.22,
1369 "handling_time":10
1370 },
1371 {
1372 "code":"{YOUR_CODE_2}",
1373 "type":"{own OR supplier}",
1374 "priority":"{0 is the high priority}",
1375 "quantity":3,
1376 "price":2.22,
1377 "special_price":1.22,
1378 "handling_time":10
1379 }
1380],
1381"variations":[
1382 {
1383 "sku": "produto_filho",
1384 "ean": "21313213131",
1385 "name":"Nome do produto pai",
1386 "external":"Codigo_do_produto_pai_no_outro_sistema",
1387 "quantity":2,
1388 "special_price":9.90,
1389 "price":12.45,
1390 "attributes":
1391 [
1392 {
1393 "code":"size","label":"Tamanho","value":{"code":"p","label":"pequeno"}
1394 }
1395 ],
1396 "stock_table":[
1397 {
1398 "code":"{YOUR_CODE}",
1399 "type":"{own OR supplier}",
1400 "priority":"{0 is the high priority}",
1401 "quantity":2,
1402 "price":2.22,
1403 "special_price":1.22,
1404 "handling_time":10
1405 },
1406 {
1407 "code":"{YOUR_CODE_2}",
1408 "type":"{own OR supplier}",
1409 "priority":"{0 is the high priority}",
1410 "quantity":3,
1411 "price":2.22,
1412 "special_price":1.22,
1413 "handling_time":10
1414 }
1415 ],
1416 "photos":[
1417 {
1418 "url": "http://www.site.com.br/enderecoimagem.jpg",
1419 "name": "imagem 1 do produto",
1420 "title": "imagem 1 do produto",
1421 "order": 1,
1422 "external": "http://www.site.com.br/enderecoimagem.jpg"
1423 },
1424 {
1425 "url": "http://www.site.com.br/enderecoimagem2.jpg",
1426 "name": "imagem 2 do produto",
1427 "title": "imagem 2 do produto",
1428 "order": 2,
1429 "external": "http://www.site.com.br/enderecoimagem.jpg"
1430 }
1431 ]
1432 }
1433 ]
1434}
1435
1436
1437Example Request
1438Create or Update a Sku Simple or With Variation
1439curl --location --request PUT "https://api.plugg.to/skus/%7Bsku_id%7D?access_token=%7Baccess_token%7D" \
1440 --header "Accept: application/json" \
1441 --header "Content-Type: application/json" \
1442 --data "{\"sku\":\"produto_pai\",
1443 \"ean\":\"21313213131\",
1444 \"ncm\":\"111\",
1445 \"name\":\"Nome do produto pai\",
1446 \"external\":\"Codigo_do_produto_pai_no_outro_sistema\",
1447 \"quantity\":2,
1448 \"special_price\":9.90,
1449 \"price\":12.45,
1450 \"short_description\":\"Descrição resumida do produto\",
1451 \"description\": \"descrição detalada do produto\",
1452 \"brand\":\"marca\",
1453 \"cost\":2.21,
1454 \"warranty_time\":3,
1455 \"warranty_message\":\"3 meses de garantia\",
1456 \"link\":\"http://site.com.br/esseproduto\",
1457 \"available\":1,
1458 \"categories\":[
1459 {\"name\":\"categoria base\"},
1460 {\"name\":\"categoria base > subcatgoria\"},
1461 {\"name\":\"categoria base > subcatgoria > tipo\"},
1462 {\"name\":\"categoria base > outrasubcategoria > outrotipo\"}
1463 ],
1464 \"handling_time\":1,
1465 \"manufacture_time\":1,
1466 \"dimension\":{
1467 \"length\":22,
1468 \"width\":22,
1469 \"height\":22,
1470 \"weight\":22
1471 },
1472 \"attributes\":
1473 [
1474 {
1475 \"code\":\"gender\",\"label\":\"Genero\",\"value\":{\"code\":\"f\",\"label\":\"feminino\"}
1476 }
1477 ],
1478 \"photos\":[
1479 {
1480 \"url\": \"http://www.site.com.br/enderecoimagem.jpg\",
1481 \"name\": \"imagem 1 do produto\",
1482 \"title\": \"imagem 1 do produto\",
1483 \"order\": 1,
1484 \"external\": \"http://www.site.com.br/enderecoimagem.jpg\"
1485 },
1486 {
1487 \"url\": \"http://www.site.com.br/enderecoimagem2.jpg\",
1488 \"name\": \"imagem 2 do produto\",
1489 \"title\": \"imagem 2 do produto\",
1490 \"order\": 2,
1491 \"external\": \"http://www.site.com.br/enderecoimagem.jpg\"
1492 }
1493 ],
1494
1495 \"price_table\":[
1496 {
1497 \"code\":\"reseller\",
1498 \"label\":\"Preço para reseller\",
1499 \"price\":5.50,
1500 \"special_price\":4.32,
1501 \"action\":\"overwrite\"
1502 },
1503 {
1504 \"code\":\"mercadolivre\",
1505 \"label\":\"Preço para o mercadolivre\",
1506 \"price\":22.50,
1507 \"special_price\":14.32,
1508 \"action\":\"overwrite\"
1509 },
1510 {
1511 \"code\":\"b2w\",
1512 \"label\":\"Preço para a b2w\",
1513 \"action\":\"increase\",
1514 \"percentage\":10
1515 }
1516 ],
1517\"stock_table\":[
1518 {
1519 \"code\":\"{YOUR_CODE}\",
1520 \"type\":\"{own OR supplier}\",
1521 \"priority\":\"{0 is the high priority}\",
1522 \"quantity\":2,
1523 \"price\":2.22,
1524 \"special_price\":1.22,
1525 \"handling_time\":10
1526 },
1527 {
1528 \"code\":\"{YOUR_CODE_2}\",
1529 \"type\":\"{own OR supplier}\",
1530 \"priority\":\"{0 is the high priority}\",
1531 \"quantity\":3,
1532 \"price\":2.22,
1533 \"special_price\":1.22,
1534 \"handling_time\":10
1535 }
1536],
1537\"variations\":[
1538 {
1539 \"sku\": \"produto_filho\",
1540 \"ean\": \"21313213131\",
1541 \"name\":\"Nome do produto pai\",
1542 \"external\":\"Codigo_do_produto_pai_no_outro_sistema\",
1543 \"quantity\":2,
1544 \"special_price\":9.90,
1545 \"price\":12.45,
1546 \"attributes\":
1547 [
1548 {
1549 \"code\":\"size\",\"label\":\"Tamanho\",\"value\":{\"code\":\"p\",\"label\":\"pequeno\"}
1550 }
1551 ],
1552 \"stock_table\":[
1553 {
1554 \"code\":\"{YOUR_CODE}\",
1555 \"type\":\"{own OR supplier}\",
1556 \"priority\":\"{0 is the high priority}\",
1557 \"quantity\":2,
1558 \"price\":2.22,
1559 \"special_price\":1.22,
1560 \"handling_time\":10
1561 },
1562 {
1563 \"code\":\"{YOUR_CODE_2}\",
1564 \"type\":\"{own OR supplier}\",
1565 \"priority\":\"{0 is the high priority}\",
1566 \"quantity\":3,
1567 \"price\":2.22,
1568 \"special_price\":1.22,
1569 \"handling_time\":10
1570 }
1571 ],
1572 \"photos\":[
1573 {
1574 \"url\": \"http://www.site.com.br/enderecoimagem.jpg\",
1575 \"name\": \"imagem 1 do produto\",
1576 \"title\": \"imagem 1 do produto\",
1577 \"order\": 1,
1578 \"external\": \"http://www.site.com.br/enderecoimagem.jpg\"
1579 },
1580 {
1581 \"url\": \"http://www.site.com.br/enderecoimagem2.jpg\",
1582 \"name\": \"imagem 2 do produto\",
1583 \"title\": \"imagem 2 do produto\",
1584 \"order\": 2,
1585 \"external\": \"http://www.site.com.br/enderecoimagem.jpg\"
1586 }
1587 ]
1588 }
1589 ]
1590}"
1591PUT Create or update a product Kit
1592https://api.plugg.to/skus/{sku_id}?access_token={access_token}
1593Use to sell multiple products as a kit, always provide the "parent" product sku, if a product has variations, KIT variations will automatically be created, each SKU code of each variation of the KIT is generated dynamically.
1594
1595After the KIT is generated, if the KIT has variations, it will no longer be possible to change the structure of products that make up the KIT.
1596
1597HEADERS
1598Acceptapplication/json
1599Content-Typeapplication/json
1600PARAMS
1601access_token{access_token}
1602BODY raw
1603{"sku":"produto_pai",
1604 "ean":"21313213131",
1605 "name":"Nome do kit",
1606 "external":"Codigo_do_produto_pai_no_outro_sistema",
1607 "quantity":2,
1608 "special_price":9.90,
1609 "price":12.45,
1610 "short_description":"Descrição resumida do produto",
1611 "description": "descrição detalada do produto",
1612 "brand":"marca",
1613 "cost":2.21,
1614 "warranty_time":3,
1615 "warranty_message":"3 meses de garantia",
1616 "link":"http://site.com.br/esseproduto",
1617 "available":1,
1618 "categories":[
1619 {"name":"categoria base"},
1620 {"name":"categoria base > subcatgoria"},
1621 {"name":"categoria base > subcatgoria > tipo"},
1622 {"name":"categoria base > outrasubcategoria > outrotipo"}
1623 ],
1624 "handling_time":1,
1625 "manufacture_time":1,
1626 "dimension":{
1627 "length":22,
1628 "width":22,
1629 "height":22,
1630 "weight":22
1631 },
1632 "attributes":
1633 [
1634 {
1635 "code":"gender","label":"Genero","value":{"code":"f","label":"feminino"}
1636 }
1637 ],
1638 "photos":[
1639 {
1640 "url": "http://www.site.com.br/enderecoimagem.jpg",
1641 "name": "imagem 1 do produto",
1642 "title": "imagem 1 do produto",
1643 "order": 1,
1644 "external": "http://www.site.com.br/enderecoimagem.jpg"
1645 },
1646 {
1647 "url": "http://www.site.com.br/enderecoimagem2.jpg",
1648 "name": "imagem 2 do produto",
1649 "title": "imagem 2 do produto",
1650 "order": 2,
1651 "external": "http://www.site.com.br/enderecoimagem.jpg"
1652 }
1653 ],
1654
1655 "price_table":[
1656 {
1657 "code":"reseller",
1658 "label":"Preço para reseller",
1659 "price":5.50,
1660 "special_price":4.32,
1661 "action":"overwrite"
1662 },
1663 {
1664 "code":"mercadolivre",
1665 "label":"Preço para o mercadolivre",
1666 "price":22.50,
1667 "special_price":14.32,
1668 "action":"overwrite"
1669 },
1670 {
1671 "code":"b2w",
1672 "label":"Preço para a b2w",
1673 "action":"increase",
1674 "percentage":10
1675 }
1676 ],
1677 "package_skus":[
1678 {
1679 "sku":"valid_parent_sku_1",
1680 "quantity": "1"
1681 },
1682 {
1683 "sku":"valid_parent_sku_2",
1684 "quantity": "1"
1685 }
1686 ]
1687}
1688
1689
1690Example Request
1691Create or update a product Kit
1692curl --location --request PUT "https://api.plugg.to/skus/%7Bsku_id%7D?access_token=%7Baccess_token%7D" \
1693 --header "Accept: application/json" \
1694 --header "Content-Type: application/json" \
1695 --data "{\"sku\":\"produto_pai\",
1696 \"ean\":\"21313213131\",
1697 \"name\":\"Nome do kit\",
1698 \"external\":\"Codigo_do_produto_pai_no_outro_sistema\",
1699 \"quantity\":2,
1700 \"special_price\":9.90,
1701 \"price\":12.45,
1702 \"short_description\":\"Descrição resumida do produto\",
1703 \"description\": \"descrição detalada do produto\",
1704 \"brand\":\"marca\",
1705 \"cost\":2.21,
1706 \"warranty_time\":3,
1707 \"warranty_message\":\"3 meses de garantia\",
1708 \"link\":\"http://site.com.br/esseproduto\",
1709 \"available\":1,
1710 \"categories\":[
1711 {\"name\":\"categoria base\"},
1712 {\"name\":\"categoria base > subcatgoria\"},
1713 {\"name\":\"categoria base > subcatgoria > tipo\"},
1714 {\"name\":\"categoria base > outrasubcategoria > outrotipo\"}
1715 ],
1716 \"handling_time\":1,
1717 \"manufacture_time\":1,
1718 \"dimension\":{
1719 \"length\":22,
1720 \"width\":22,
1721 \"height\":22,
1722 \"weight\":22
1723 },
1724 \"attributes\":
1725 [
1726 {
1727 \"code\":\"gender\",\"label\":\"Genero\",\"value\":{\"code\":\"f\",\"label\":\"feminino\"}
1728 }
1729 ],
1730 \"photos\":[
1731 {
1732 \"url\": \"http://www.site.com.br/enderecoimagem.jpg\",
1733 \"name\": \"imagem 1 do produto\",
1734 \"title\": \"imagem 1 do produto\",
1735 \"order\": 1,
1736 \"external\": \"http://www.site.com.br/enderecoimagem.jpg\"
1737 },
1738 {
1739 \"url\": \"http://www.site.com.br/enderecoimagem2.jpg\",
1740 \"name\": \"imagem 2 do produto\",
1741 \"title\": \"imagem 2 do produto\",
1742 \"order\": 2,
1743 \"external\": \"http://www.site.com.br/enderecoimagem.jpg\"
1744 }
1745 ],
1746
1747 \"price_table\":[
1748 {
1749 \"code\":\"reseller\",
1750 \"label\":\"Preço para reseller\",
1751 \"price\":5.50,
1752 \"special_price\":4.32,
1753 \"action\":\"overwrite\"
1754 },
1755 {
1756 \"code\":\"mercadolivre\",
1757 \"label\":\"Preço para o mercadolivre\",
1758 \"price\":22.50,
1759 \"special_price\":14.32,
1760 \"action\":\"overwrite\"
1761 },
1762 {
1763 \"code\":\"b2w\",
1764 \"label\":\"Preço para a b2w\",
1765 \"action\":\"increase\",
1766 \"percentage\":10
1767 }
1768 ],
1769 \"package_skus\":[
1770 {
1771 \"sku\":\"valid_parent_sku_1\",
1772 \"quantity\": \"1\"
1773 },
1774 {
1775 \"sku\":\"valid_parent_sku_2\",
1776 \"quantity\": \"1\"
1777 }
1778 ]
1779}"
1780PUT Update Sku Stock
1781https://api.plugg.to/skus/{sku_id}/stock?access_token={access_token}
1782THis method is used to update just the stock of one sku, you can choose between:
1783
17841) Increase: If you send the action "increase" will add the quantity send to the product. Ie. If you send 3 as quantity and the product already has 4, the product will ends with 7 of stock. The common use for this action is when you need to return a item to the stock
1785
17861) Decrease: If you send the action "decrease" will decrease the quantity send to the product. Ie. If you send 1 as quantity and the product has 4, the product will ends with 3 of stock. The common use for this action is when you have a sale.
1787
17881) Update: If you send the action "update" this quantity will overwrite the actual product stock, so if you send 5 not matter how quantity the sku has, will ends with 5, the common use for that is in a stock balance moment.
1789
1790HEADERS
1791Acceptapplication/json
1792Content-Typeapplication/json
1793PARAMS
1794access_token{access_token}
1795BODY raw
1796 {"action":"increase/decrease/update","quantity":1,"sku":"id_sku"}
1797
1798
1799Example Request
1800Update Sku Stock
1801curl --location --request PUT "https://api.plugg.to/skus/%7Bsku_id%7D/stock?access_token=%7Baccess_token%7D" \
1802 --header "Accept: application/json" \
1803 --header "Content-Type: application/json" \
1804 --data " {\"action\":\"increase/decrease/update\",\"quantity\":1,\"sku\":\"id_sku\"}"
1805DEL Delete One Sku
1806https://api.plugg.to/skus/{sku_id}?access_token={access_token}
1807Delete one SKU by sku code
1808
1809HEADERS
1810Acceptapplication/json
1811PARAMS
1812access_token{access_token}
1813BODY file
1814
1815
1816Example Request
1817Delete One Sku
1818curl --location --request DELETE "https://api.plugg.to/skus/%7Bsku_id%7D?access_token=%7Baccess_token%7D" \
1819 --header "Accept: application/json" \
1820 --data-binary "=@"
1821GET Get one product (by sku)
1822https://api.plugg.to/skus/{product_sku}?access_token={access_token}
1823HEADERS
1824Acceptapplication/json
1825Content-Typeapplication/json
1826PARAMS
1827access_token{access_token}
1828BODY raw
1829{"sku":"pai","name":"Pai","variations":[
1830
1831{"sku":"pai-var1","quantity":2,"price":10.99,"name":"pai var 1",
1832
1833"price_table":[
1834 {"code":"price1","action":"decrease","percentage":10},
1835 {"code":"price2","price":9.99,"special_price":15,"minimum_price":8.00,"action":"overwrite"}
1836 ]
1837
1838},
1839
1840{"sku":"pai-var2","quantity":3,"price":11.99,"name":"pai var 2"},
1841
1842{"sku":"pai-var3","quantity":4,"price":12.99,"name":"pai var 3"},
1843
1844{"sku":"pai-var4","quantity":4,"price":12.99,"name":"pai var 4"}
1845
1846]}
1847
1848
1849Example Request
1850Get one product (by sku)
1851curl --location --request GET "https://api.plugg.to/skus/%7Bproduct_sku%7D?access_token=%7Baccess_token%7D" \
1852 --header "Accept: application/json" \
1853 --header "Content-Type: application/json" \
1854 --data "{\"sku\":\"pai\",\"name\":\"Pai\",\"variations\":[
1855
1856{\"sku\":\"pai-var1\",\"quantity\":2,\"price\":10.99,\"name\":\"pai var 1\",
1857
1858\"price_table\":[
1859 {\"code\":\"price1\",\"action\":\"decrease\",\"percentage\":10},
1860 {\"code\":\"price2\",\"price\":9.99,\"special_price\":15,\"minimum_price\":8.00,\"action\":\"overwrite\"}
1861 ]
1862
1863},
1864
1865{\"sku\":\"pai-var2\",\"quantity\":3,\"price\":11.99,\"name\":\"pai var 2\"},
1866
1867{\"sku\":\"pai-var3\",\"quantity\":4,\"price\":12.99,\"name\":\"pai var 3\"},
1868
1869{\"sku\":\"pai-var4\",\"quantity\":4,\"price\":12.99,\"name\":\"pai var 4\"}
1870
1871]}"
1872GET Get all products
1873https://api.plugg.to/products?access_token={access_token}&next={last_pluggto_id}&limit=100
1874From this endpoint is possible to get all products from PluggTo.
1875
1876Paging
1877next Insert the last id found in the previus call
1878limit Insert the number or registers to be returned
1879Filters
1880created Check from creation date (ie 2017-01-01to2017-02-01)
1881modified Check from update date. (ie 2017-01-01to2017-02-01)
1882available Check if is available in your app
1883all Search a string (like) in name or description field
1884sku Search by sku (exact) sku in parent or child
1885bysku Search by sku (like) in parent or child
1886category Search by string in category field (like)
1887attribute Search by attribute code or attribute value field (exact)
1888id Search by pluggto id in parent or child
1889has_external See if has your application product id
1890quantity Search by quantity/td>
1891quantity Search by quantity in parent or child
1892others you can search by any other api propriety, like "brand=MyBrand"
1893HEADERS
1894Acceptapplication/json
1895Content-Typeapplication/json
1896PARAMS
1897access_token{access_token}
1898next{last_pluggto_id}
1899limit100
1900BODY raw
1901{"sku":"pai","name":"Pai","variations":[
1902
1903{"sku":"pai-var1","quantity":2,"price":10.99,"name":"pai var 1",
1904
1905"price_table":[
1906 {"code":"price1","action":"decrease","percentage":10},
1907 {"code":"price2","price":9.99,"special_price":15,"minimum_price":8.00,"action":"overwrite"}
1908 ]
1909
1910},
1911
1912{"sku":"pai-var2","quantity":3,"price":11.99,"name":"pai var 2"},
1913
1914{"sku":"pai-var3","quantity":4,"price":12.99,"name":"pai var 3"},
1915
1916{"sku":"pai-var4","quantity":4,"price":12.99,"name":"pai var 4"}
1917
1918]}
1919
1920
1921Example Request
1922Get all products
1923curl --location --request GET "https://api.plugg.to/products?access_token=%7Baccess_token%7D&next=%7Blast_pluggto_id%7D&limit=100" \
1924 --header "Accept: application/json" \
1925 --header "Content-Type: application/json" \
1926 --data "{\"sku\":\"pai\",\"name\":\"Pai\",\"variations\":[
1927
1928{\"sku\":\"pai-var1\",\"quantity\":2,\"price\":10.99,\"name\":\"pai var 1\",
1929
1930\"price_table\":[
1931 {\"code\":\"price1\",\"action\":\"decrease\",\"percentage\":10},
1932 {\"code\":\"price2\",\"price\":9.99,\"special_price\":15,\"minimum_price\":8.00,\"action\":\"overwrite\"}
1933 ]
1934
1935},
1936
1937{\"sku\":\"pai-var2\",\"quantity\":3,\"price\":11.99,\"name\":\"pai var 2\"},
1938
1939{\"sku\":\"pai-var3\",\"quantity\":4,\"price\":12.99,\"name\":\"pai var 3\"},
1940
1941{\"sku\":\"pai-var4\",\"quantity\":4,\"price\":12.99,\"name\":\"pai var 4\"}
1942
1943]}"
1944Freight
1945
1946GET Freight (Client)
1947https://api.plugg.to/shipping?access_token={access_token}&postalcode=06543210&country=BRA&skus={sku}:{quantity}
1948Method for consulting the freight of a product
1949
1950PARAMS
1951access_token{access_token}
1952postalcode06543210
1953countryBRA
1954skus{sku}:{quantity}
1955BODY formdata
1956
1957
1958Example Request
1959Freight (Client)
1960curl --location --request GET "https://api.plugg.to/shipping?access_token=%7Baccess_token%7D&postalcode=06543210&country=BRA&skus=%7Bsku%7D:%7Bquantity%7D"
1961POST Freight (Source)
1962https://yoursite.com/shipping
1963
1964This API is to partners that provide SHIPPING INFORMATION and should be implemented in the parter side to provide to PluggTo information about the shipping cost.
1965
1966Attention: This answer shoud take 0.200 seconds maximum
1967
1968PluggTo will POST to a URL pre-register with the folling information:
1969
1970(be aware that depending the MarketPlace one or other information maybe will be empty)
1971{
1972"destination_postalcode" : 23131331, // zipcode
1973"country" : "BR", // país
1974"origin_country" : "BR", // país de origem
1975"products" : [
1976{
1977"weight" : 10, // peso
1978"height" : 10, // altura
1979"length" : 10, // comprimento
1980"width" : 10, // largura
1981"sku" : "MLB673212405", // sku do produto
1982"id" : "559c45d77c5580f1155d0fec", // id
1983"quantity" : "1" // quantidade
1984"unit_price":21.21,
1985"crossdocking":0
1986},
1987{
1988"weight" : 100,
1989"height" : 100,
1990"length" : 100,
1991"sku" : "MLB675906701",
1992"id" : "559c45e37c5580f1155d1013",
1993"width" : 100,
1994"quantity" : "4"
1995"unit_price":21.21,
1996"crossdocking":0
1997} ], "user_id" : 129,
1998"origin_city" : "SAO PAULO",
1999"origin_postalcode" : "06543210",
2000"state" : null,
2001"origin_state" : "SP"
2002}
2003The success answer should be:
2004
2005
2006[
2007{
2008"method" : "Service 1",
2009"company" : "Company Name",
2010"price" : 40.52,
2011"estimate" : 2
2012},
2013{
2014"method" : "Service 2",
2015"company" : "Company Name",
2016"price" : 50.52,
2017"estimate" : 1
2018}
2019]
2020In case of error:
2021
2022[
2023{
2024"mensage" : "Error Mensagem"
2025}
2026]
2027
2028HEADERS
2029Content-Typeapplication/json
2030BODY raw
2031{
2032"destination_postalcode" : "05004010",
2033"country" : "BR",
2034"origin_country" : "BR",
2035"user_id" : 1793,
2036"products" : [
2037{
2038"weight" : 10,
2039"height" : 10,
2040"length" : 10,
2041"width" : 10,
2042"sku" : "parent-000000000001000906",
2043"quantity" : "1",
2044"crossdocking":0,
2045"unit_price":0.00
2046}],
2047"origin_city" : "SAO PAULO",
2048"origin_postalcode" : "05004015",
2049"state" : "SP",
2050"origin_state" : "SP"
2051}
2052
2053
2054Example Request
2055Freight (Source)
2056curl --location --request POST "https://yoursite.com/shipping" \
2057 --header "Content-Type: application/json" \
2058 --data "{
2059\"destination_postalcode\" : \"05004010\",
2060\"country\" : \"BR\",
2061\"origin_country\" : \"BR\",
2062\"user_id\" : 1793,
2063\"products\" : [
2064{
2065\"weight\" : 10,
2066\"height\" : 10,
2067\"length\" : 10,
2068\"width\" : 10,
2069\"sku\" : \"parent-000000000001000906\",
2070\"quantity\" : \"1\",
2071\"crossdocking\":0,
2072\"unit_price\":0.00
2073}],
2074\"origin_city\" : \"SAO PAULO\",
2075\"origin_postalcode\" : \"05004015\",
2076\"state\" : \"SP\",
2077\"origin_state\" : \"SP\"
2078} "
2079Messages
2080
2081POST Create Message (Beta)
2082https://api.plugg.to/messages?access_token={access_token}
2083HEADERS
2084Content-Typeapplication/json
2085PARAMS
2086access_token{access_token}
2087BODY raw
2088{
2089 "channel":"core",
2090 "original_id":"123",
2091 "status":"['new','answered','pending','closed']",
2092 "type":"['question','problem','incident','task','warning']",
2093 "priority":"['urgent','high','normal','low']",
2094 "customer_name":"Andre",
2095 "customer_phone":"1111111111",
2096 "copy_emails":"name@teste.com,name@plugg.to",
2097 "subject":"Uma nova mensagem",
2098 "tags":"anytext",
2099 "item_related":"some Order or Sku Id",
2100 "interections":[
2101 {
2102 "from":"['external','seller']",
2103 "comment":"Ola Essa é uma nova mensagem urgente lala4",
2104 "attachments":[
2105 {
2106 "url":"http://www.usjt.br/app/uploads/2017/08/pdf_teste.pdf"
2107 }
2108 ]
2109 }
2110 ]
2111}
2112
2113
2114Example Request
2115Create Message (Beta)
2116curl --location --request POST "https://api.plugg.to/messages?access_token=%7Baccess_token%7D" \
2117 --header "Content-Type: application/json" \
2118 --data "{
2119 \"channel\":\"core\",
2120 \"original_id\":\"123\",
2121 \"status\":\"['new','answered','pending','closed']\",
2122 \"type\":\"['question','problem','incident','task','warning']\",
2123 \"priority\":\"['urgent','high','normal','low']\",
2124 \"customer_name\":\"Andre\",
2125 \"customer_phone\":\"1111111111\",
2126 \"copy_emails\":\"name@teste.com,name@plugg.to\",
2127 \"subject\":\"Uma nova mensagem\",
2128 \"tags\":\"anytext\",
2129 \"item_related\":\"some Order or Sku Id\",
2130 \"interections\":[
2131 {
2132 \"from\":\"['external','seller']\",
2133 \"comment\":\"Ola Essa é uma nova mensagem urgente lala4\",
2134 \"attachments\":[
2135 {
2136 \"url\":\"http://www.usjt.br/app/uploads/2017/08/pdf_teste.pdf\"
2137 }
2138 ]
2139 }
2140 ]
2141}"
2142GET List Messages (Beta)
2143https://api.plugg.to/messages?access_token={token}
2144From this endpoint is possible to get all messages from PluggTo.
2145
2146Paging
2147next Insert the last id found in the previus call
2148limit Insert the number or registers to be returned
2149Filters
2150created Check from creation date (ie 2017-01-01to2017-02-01)
2151modified Check from update date. (ie 2017-01-01to2017-02-01)
2152channel Any channel
2153all Search a string (like) in name or description field
2154others you can search by any other api propriety, like "brand=MyBrand"
2155HEADERS
2156Content-Typeapplication/json
2157PARAMS
2158access_token{token}
2159BODY raw
2160{
2161"interections":[
2162 {
2163 "id":"59b82c194b537bb43462fd9d",
2164 "from":"customer",
2165 "comment":"Nova outra interação reformada"
2166 }
2167
2168 ]
2169
2170
2171
2172
2173}
2174
2175
2176Example Request
2177List Messages (Beta)
2178curl --location --request GET "https://api.plugg.to/messages?access_token=%7Btoken%7D" \
2179 --header "Content-Type: application/json" \
2180 --data "{
2181\"interections\":[
2182 {
2183 \"id\":\"59b82c194b537bb43462fd9d\",
2184 \"from\":\"customer\",
2185 \"comment\":\"Nova outra interação reformada\"
2186 }
2187
2188 ]
2189
2190
2191
2192
2193}"
2194PUT Add an interection (Beta)
2195https://api.plugg.to/messages?access_token={access_token}
2196HEADERS
2197Content-Typeapplication/json
2198PARAMS
2199access_token{access_token}
2200BODY raw
2201{
2202"interections":[
2203 {
2204 "id":"59b82c194b537bb43462fd9d",
2205 "from":"customer",
2206 "comment":"Nova outra interação reformada"
2207 }
2208 ]
2209
2210
2211
2212
2213}
2214
2215
2216Example Request
2217Add an interection (Beta)
2218curl --location --request PUT "https://api.plugg.to/messages?access_token=%7Baccess_token%7D" \
2219 --header "Content-Type: application/json" \
2220 --data "{
2221\"interections\":[
2222 {
2223 \"id\":\"59b82c194b537bb43462fd9d\",
2224 \"from\":\"customer\",
2225 \"comment\":\"Nova outra interação reformada\"
2226 }
2227 ]
2228
2229
2230
2231
2232}"
2233PUT Add an interection (Beta)
2234https://api.plugg.to/messages?access_token={access_token}
2235HEADERS
2236Content-Typeapplication/json
2237PARAMS
2238access_token{access_token}
2239BODY raw
2240{
2241"interections":[
2242 {
2243 "from":"customer",
2244 "comment":"Nova outra interação reformada"
2245 }
2246 ]
2247
2248
2249
2250
2251}
2252
2253
2254Example Request
2255Add an interection (Beta)
2256curl --location --request PUT "https://api.plugg.to/messages?access_token=%7Baccess_token%7D" \
2257 --header "Content-Type: application/json" \
2258 --data "{
2259\"interections\":[
2260 {
2261 \"from\":\"customer\",
2262 \"comment\":\"Nova outra interação reformada\"
2263 }
2264 ]
2265
2266
2267
2268
2269}"
2270PLUGGTO PUBLIC API
2271
2272Introduction
2273Authentication
2274Notifications/Webhook
2275Orders
2276Products
2277Freight
2278Messages
2279×
2280Drag and Drop
2281The image will be downloaded