Setting Ysell.pro through API
API (Application Programming Interface) dient als Schnittstelle zwischen Programmen und vereinfacht deren Interaktion.
Ysell bietet die Möglichkeit, mit Webdiensten über unsere eigene API zu arbeiten.
Um mit der API zu arbeiten, sollten Sie ein API-Token für den Benutzer angebenDie Trägerauthentifizierung (Bearer authentication) ist ein HTTP-Authentifizierungsschema, das Sicherheitsmarker verwendet, die so genannten Träger-Token. Das Bearer-Token ist eine kodierte Zeichenkette, die normalerweise vom Server als Antwort auf eine Anfrage zur Eingabe in das System erzeugt wird. Ein Client sollte das Token im Authorization-Header senden, während er die Anfrage erstellt: Authorization: bearer <token>
Produkt
Curl
curl -X 'GET' \ 'https://719.eu6.ysell.pro/api/v1/product' \ -H 'accept: */*' \ -H 'Authorization: Bearer'
Response body
[ { "id": 1, "ext_id": "1", "title": "Melozio", "condition": "New", "manufacturer_id": 1, "purchase_price": "2.50", "netto": 100, "main_supplier": { "id": 1, "product_id": 1, "supplier_id": 1, "supplier_num": "45245634", "note": "", "url": "", "qty": 0, "price": "2.50", "discount_enabled": 0, "discount_price": null, "discount_qty": 0, "main": 1 }, "listings": [], "image": "" },
Abrufen der Produktliste des Kunden
Neues Produkt erstellen
Curl
curl -X 'POST' \ 'https://719.eu6.ysell.pro/api/v1/product' \ -H 'accept: */*' \ -H 'Authorization: Bearer 123321' \ -H 'Content-Type: multipart/form-data' \ -F 'productDimensionW=10' \ -F 'masterboxWeight=17' \ -F 'packageDimensionD=6' \ -F 'productWeight=0.1' \ -F 'masterboxDimensionD=60' \ -F 'packageDimensionH=12' \ -F 'productWeightUnits=kg' \ -F 'manufacturer_id=1' \ -F 'masterboxDimensionH=60' \ -F 'product_image=https://719.eu6.ysell.pro/product_images/150/1.jpg' \ -F 'masterboxQty=200' \ -F 'productDimensionD=6' \ -F 'masterboxWeightUnits=kg' \ -F 'packageDimensionUnits=cm' \ -F 'productDimensionH=12' \ -F 'packageWeightUnits=kg' \ -F 'masterboxDimensionUnits=cm' \ -F 'packageDimensionW=10' \ -F 'productDimensionUnits=cm' \ -F 'title=Tequila Sunset' \ -F 'ext_id=p-719-155' \ -F 'masterboxDimensionW=120' \ -F 'id=155' \ -F 'packageWeight=0.5'
Response body
{ "id": 155, "ext_id": "p-719-155", "title": "Tequila Sunset", "condition": "New", "manufacturer_id": 1, "purchase_price": null, "netto": 0, "main_supplier": null, "listings": [], "image": "https://719.eu6.ysell.pro/product_images/150/1.jpg" }
Erstellung eines Produkts mit der ID 155, das den Namen Tequila Sunset trägt, mit Angabe der Produktabmessungen, der Verpackungsgröße und des Produktbildes.
id - product ID
ext_id - Product ID des Produkts.
title - Produktname.
product_image - Link zum Produktbild.
manufacturer_id - ID von zuvor erstellten Produktherstellern.
packageDimensionW - Abmessungen der Verpackung des Produkts (Breite).
packageDimensionH - Abmessungen der Verpackung des Produkts (Höhe).
packageDimensionD - Abmessungen der Verpackung des Produkts (Tiefe).
packageDimensionUnits - Maßeinheit des Packstücks.
packageWeight - Gewicht des Pakets.
packageWeightUnits - Maßeinheit für das Gewicht des Produkts.
masterboxDimensionW - Abmessungen der Masterbox (Breite).
masterboxDimensionH - Abmessungen der Masterbox (Höhe).
masterboxDimensionD - Abmessungen der Masterbox (Tiefe).
masterboxDimensionUnits - Maßeinheit Dimension der Masterbox.
masterboxQty - Masterbox-Menge des Produkts.
masterboxWeight - Masterbox-Gewicht des Produkts.
masterboxWeightUnits - Maßeinheit des Gewichts der Masterbox mit dem Produkt.
productDimensionD - Produktabmessungen (Tiefe).
productDimensionW - Produktabmessungen (Breite).
productDimensionH - Produktabmessungen (Höhe).
productDimensionUnits - Maßeinheit der Produkteinheit.
productWeightUnits - Maßeinheit für das Gewicht des Produkts.
productWeight - Gewicht des Produkts
Curl
curl -X 'GET' \ 'https://719.eu6.ysell.pro/api/v1/product/155' \ -H 'accept: application/json' \ -H 'Authorization: Bearer 123321'
Response body
{ "id": 155, "ext_id": "p-719-155", "title": "Tequila Sunset", "condition": "New", "manufacturer_id": 1, "purchase_price": null, "netto": 0, "main_supplier": null, "listings": [], "image": "https://719.eu6.ysell.pro/product_images/150/1.jpg" }
Abrufen von Informationen über ein Produkt anhand seiner ID
—-
Curl
curl -X 'DELETE' \ 'https://719.eu6.ysell.pro/api/v1/product/153' \ -H 'accept: */*' \ -H 'Authorization: Bearer 123321'
Deleting product ID
Create fbm/fba lisging - wird für die Erstellung von Amazon-Listings verwendet.
productId - Produkt-ID eingeben, um FBM/FBA-Auflistung hinzuzufügen.
company_id - Unternehmens-ID, die als Eigentümer der Liste angegeben wird.
marketplace_id - ID der Verkaufsplattorm list of marketplaces IDs.
platform - Verkaufsplattform, welche für die Erstellung von Angeboten verwendet wird
sku - Die angegebene SKU wird für die Erstellung der Liste verwendet.
asin - Die angegebene ASIN wird für die Erstellung der Liste verwendet.
type - den Angebotstyp angeben - FBA/FBM.
title - ID-Titel eingeben.
price - Listenpreis angeben.
Curl
curl -X 'POST' \ 'https://719.eu6.ysell.pro/api/v1/product/set-supplier' \ -H 'accept: */*' \ -H 'Authorization: Bearer 123321' \ -H 'Content-Type: multipart/form-data' \ -F 'discount_enabled=1' \ -F 'price=11' \ -F 'discount_price=' \ -F 'product_id=155' \ -F 'supplier_id=3' \ -F 'url=google.com' \ -F 'note=Note' \ -F 'supplier_num=322' \ -F 'qty=14' \ -F 'discount_qty=' \ -F 'main=1'
Response body
{ "id": 45, "product_id": 155, "supplier_id": 3, "supplier_num": "322", "note": "Note", "url": "google.com", "qty": "14", "price": "11", "discount_enabled": "1", "discount_price": null, "discount_qty": null, "main": "1" }
Lieferantenaktualisierung
Update product Suplier - Wird für die Aktualisierung der Informationen über den Produktlieferanten verwendet
product_id - Eine Produkt-ID angeben.
supplier_id - Geben Sie eine Lieferanten-ID an.
supplier_num - Lieferanten-Produktnummer.
price - Produktpreis.
discount_price - Preis mit Rabatt.
discount_enabled - Wird für die Aktivierung des Produktrabatts verwendet. 1 - aktivieren, 2 - deaktivieren.
qty - Produktmenge.
main - Falls der Produktlieferant der Hauptlieferant ist
url - Link zur Website des Anbieters.
note = Notiz/Memo.
Lieferant
Curl
curl -X 'GET' \ 'https://719.eu6.ysell.pro/api/v1/supplier' \ -H 'accept: */*' \ -H 'Authorization: Bearer '
Response body
[ { "id": 1, "name": "Nespresso DE", "memo": "" }, { "id": 2, "name": "SET", "memo": "" }, { "id": 3, "name": "A&V furniture company ", "memo": null }, { "id": 4, "name": "Test", "memo": "" }, { "id": 5, "name": "2", "memo": "" }, ]
Lieferantenliste von einem Kunden erhalten
Curl
curl -X 'POST' \ 'https://719.eu6.ysell.pro/api/v1/supplier' \ -H 'accept: */*' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "id": 0, "name": "testSupplier2" }'
Response body
{ "id": 16, "name": "testSupplier2", "memo": null }
Erstellen eines Lieferanten mit dem Titel testSupplier2
Curl
curl -X 'GET' \ 'https://719.eu6.ysell.pro/api/v1/supplier/322/product' \ -H 'accept: */*' \ -H 'Authorization: Bearer '
Response body
{ "id": 45, "product_id": 155, "supplier_id": 3, "supplier_num": "322", "note": "Note", "url": "google.com", "qty": 14, "price": "11.00", "discount_enabled": 1, "discount_price": null, "discount_qty": 0, "main": 1 }
Informationen über die Produkt-ID mit der Nummer „322“ abrufen
GET /supplier/{supplierNum}/product Find product by supplier num - Wird für die Rückgabe von ID-Informationen nach Lieferantennummer verwendet.
Curl
curl -X 'PUT' \ 'https://719.eu6.ysell.pro/api/v1/supplier/3' \ -H 'accept: */*' \ -H 'Authorization: Bearer 123321' \ -H 'Content-Type: application/json' \ -d '{ "id": 0, "name": "UpdatedSupplier" }'
Response body
{ "id": 3, "name": "UpdatedSupplier", "memo": null }
Aktualisierung der Informationen über den Lieferanten mit der ID „3“.
Curl
curl -X 'DELETE' \ 'https://719.eu6.ysell.pro/api/v1/supplier/3' \ -H 'accept: */*' \ -H 'Authorization: Bearer 123321' }'
Löschung des Lieferanten mit ID „3“
Hersteller
Curl
curl -X 'GET' \ 'https://719.eu6.ysell.pro/api/v1/manufacturer' \ -H 'accept: */*' \ -H 'Authorization: Bearer'
Response body
[ { "id": 1, "name": "Nespresso" }, { "id": 3, "name": "A&V furniture company " }, ]
Informationen über Hersteller vom Kunden erhaltent
Curl
curl -X 'POST' \ 'https://719.eu6.ysell.pro/api/v1/manufacturer' \ -H 'accept: */*' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "id": 0, "name": "NewManufacturer" }'
Response body
{ "id": 23, "name": "NewManufacturer" }
Hersteller erstellt „NewManufacturer“
Curl
curl -X 'PUT' \ 'https://719.eu6.ysell.pro/api/v1/manufacturer/22' \ -H 'accept: */*' \ -H 'Authorization: Bearer 123321' \ -H 'Content-Type: application/json' \ -d '{ "id": 0, "name": "NewManufacturer2" }'
Response body
{ "id": 22, "name": "NewManufacturer2" }
Aktualisierung der Informationen über den Hersteller mit dem Namen „NewManufacturer2“
Curl
curl -X 'DELETE' \ 'https://719.eu6.ysell.pro/api/v1/manufacturer/22' \ -H 'accept: */*' \ -H 'Authorization: Bearer '
Informationen über den Hersteller mit der ID „22“ löschen
Verkaufsplattformen
Curl
curl -X 'GET' \ 'https://719.eu6.ysell.pro/api/v1/marketplace' \ -H 'accept: */*' \ -H 'Authorization: Bearer '
Response body
[ { "id": 1, "country_code": "GB", "currency": "GBP", "marketplace_id": "A1F83G8C2ARO7P", "url": "https://amazon.co.uk", "created_at": null, "updated_at": null, "sales_channel": "amazon.co.uk", "region": "AMAZON_EU", "endpoint": "https://mws-eu.amazonservices.com", "domain_zone": "co.uk" }, ]
Bestellungen
Vorgänge mit Aufträgen
Curl
curl -X 'GET' \ 'https://719.eu6.ysell.pro/api/v1/order?sort=o-719-67&page=1' \ -H 'accept: */*' \ -H 'Authorization: Bearer '
Curl
curl -X 'POST' \ 'https://719.eu6.ysell.pro/api/v1/order' \ -H 'accept: */*' \ -H 'Authorization: Bearer 123321' \ -H 'Content-Type: multipart/form-data' \ -F 'buyer_state=' \ -F 'buyer_phone_number=+49 421 668 9414 0' \ -F 'payment_date=2022-04-30' \ -F 'status_id=' \ -F 'buyer_country=DE' \ -F 'purchase_date=2022-04-30' \ -F 'ship_state=' \ -F 'ship_city=Bremen' \ -F 'ship_name=Gomez' \ -F 'buyer_email=gomez@gmail.com' \ -F 'currency=' \ -F 'platform=amazon' \ -F 'ship_country=DE' \ -F 'buyer_addr1=Walter-Geerdes-Str' \ -F 'buyer_postal_code=28307' \ -F 'buyer_addr2=Walter-Geerdes-Str' \ -F 'buyer_city=Bremen' \ -F 'buyer_name=Gomez' \ -F 'platform_order_id=Amazon-1' \ -F 'latest_ship_date=2022-04-30' \ -F 'ship_email=info@fulfillment-box.de' \ -F 'id=' \ -F 'company_id=719' \ -F 'ship_phone_number=+49 421 668 9414 0' \ -F 'ship_addr1=Walter-Geerdes-Str' \ -F 'ship_addr2=14' \ -F 'ship_postal_code=28307 '
POST /order Create new order - wird für die Erstellung eines neuen Auftrags verwendet.
id - Bestell-ID. Wenn das Kästchen „Send empty value“ markiert ist, wird die ID automatisch generiert.
status_id - Status order ID. Aktivieren Sie das Kontrollkästchen „Send empty value“, um den Status automatisch zu setzen.
company_id - Company ID auf ysell.pro.
platform - Plattform, die für die Auftragserstellung verwendet wird.
platform_order_id - Bestell-Id auf der Plattform.
purchase_date - Bestellungskaufdatum.
payment_date - Zahlungsdatum der Bestellung.
latest_ship_date - Der letzte Zeitraum für das Absenden der Bestellung.
currency - Währung.
ship_name - Name des Empfängers.
ship_email - E-Mail Adresse des Empfängers.
ship_addr1 - Adresse des Empfängers.
ship_city - Stadt des Empfängers.
ship_postal_code - Postleitzahl des Empfängers.
ship_country - Land des Empfängers.
ship_phone_number - Rufnummer des Empfängers.
Curl
curl -X 'GET' \ 'https://719.eu6.ysell.pro/api/v1/order/75' \ -H 'accept: */*' \ -H 'Authorization: Bearer '
Informationen über die Bestellung mit ID 75 erhalten
Curl
curl -X 'DELETE' \ 'https://719.eu6.ysell.pro/api/v1/order/60' \ -H 'accept: */*' \ -H 'Authorization: Bearer '
Löschung des Auftrags mit ID 75
Curl
curl -X 'POST' \ 'https://719.eu6.ysell.pro/api/v1/order-item' \ -H 'accept: */*' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: multipart/form-data' \ -F 'p_id=155' \ -F 'order_id=70' \ -F 'shipment_items_cost=20' \ -F 'qty=15' \ -F 'asin=TestAsin' \ -F 'id=' \ -F 'product_name=TestName' \ -F 'item_price=15' \ -F 'sku=TestSKU'
Response body
{ "id": 147, "order_id": "70", "sku": "TestSKU", "qty": "15", "image": "https://719.eu6.ysell.pro/product_images/155/51yLgO1l4xL (1).jpg", "item_price": "15", "unit_price": null, "product_id": null, "item_type": "product" }
Hinzufügen eines Produkts zu einer Bestellung mit ID 70
Post /order-item Create new order item - wird für das Hinzufügen von Positionen zum Auftrag verwendet.
Sendungen
Vorgänge mit Sendungen
Curl
curl -X 'GET' \ 'https://719.eu6.ysell.pro/api/v1/prep-shipment?page=1&per-page=10&sort=1' \ -H 'accept: */*' \ -H 'Authorization: Bearer 123321'
Response body
{ "id": 1, "company_id": 719, "shipment_num": "719-1", "shipment_type": "warehouse", "shipment_type_description": "Send to the warehouse", "status": 0, "status_description": "New", "total_cost": 0, "declared_qty": 211, "declared_box_qty": 0, "processed_qty": 0, "messages": [] },
Informationen zur Sendung 719-1
GET /prep-shipment Get prep shipment list - wird verwendet, um Informationen über den Versand vom Prep Center zu erhalten.
company_id - Unternehmens-ID.
shipment_num - Nummer der Sendung.
shipment_type - Art der Sendung.
shipment_type_description - Beschreibung der Versandart.
status - Status der Sendung.
status_description - Beschreibung des Sendungsstatus.
total_cost - Preis für die Transportabwicklung.
declared_qty - Menge der vom Kunden angegebenen Produkteinheiten.
declared_box_qty - Anzahl der Kartons mit dem vom Kunden angegebenen Produkt.
processed_qty - Menge des vom Prep Center verarbeiteten Produkts.
messages - Mitteilung an den Versand.