Dies ist eine alte Version des Dokuments!


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 angeben
Die 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>

Gehen Sie zum Tab Users (SettingsUsers).
Fügen Sie einen neuen Benutzer hinzu (API-Token sollte ein Feld mit einem Zufallswert sein).
Gehen Sie auf Settings - ysell API

Autorisieren Sie sich mit dem API-Token, indem Sie auf Authorize klicken. Geben Sie Bearer und generated API key in die Authentifizierungszeichenfolge ein.

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

Get products list - Abrufen der Produktliste des Kunden
Page parameter - Geben Sie die Seite an, von der aus der Import durchgeführt wird
Per-page - Anzahl der Produkte pro Seite










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

Find Product by ID - wird verwendet, um Informationen über ein Produkt anhand seiner ID zu erhalten.

productId - die Produkt-ID angeben.









—-

Update product - wird für die Bearbeitung der zuvor erstellten ID des Produkts verwendet. Geben Sie die zu bearbeitenden Informationen im Block Request body an.

productId - eine Produkt-ID eingeben.

Curl

curl -X 'DELETE' \
  'https://719.eu6.ysell.pro/api/v1/product/153' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer  123321'

Deleting product ID

Delete Product - wird zum Löschen der Produkt-ID verwendet.

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

Geschäfte mit Lieferanten

/supplier Return all supplier - liefert Lieferantenliste von einem Kunden.
















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


Geben Sie /supplier ein, um einen neuen Lieferanten zu erstellen

Geben Sie den Namen des Lieferanten an. Die Lieferanten-ID wird automatisch zugewiesen.

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
}

Getting information on product ID by number „322“





GET /supplier/{supplierNum}/product Find product by supplier num - is used for returning ID information by Supplier number







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
}

Updating information on the Supplier with ID „3“

PUT /supplier/{supplierID} Update Supplier - is used for information editing on Supplier

supplierId - specify supplier ID

Curl

curl -X 'DELETE' \
  'https://719.eu6.ysell.pro/api/v1/supplier/3' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer 123321'
}'

Supplier deleting with ID „3“


Delete /supplier/{supplierID} - is used for deleting information about Supplier
supplierId - Supplier ID

Manufacturer

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 "
  },
]

Getting information on Manufacturers from Client

Operations with Manufacturers

GET /manufacturer Return all manufacturers - is used for returning information on Manufacturers from Client





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"
}

Manufacturer creating „NewManufacturer“


Post /maufacturer Create new Manufacturer

Enter a name of Manufacturer in the „Name“ field. ID of Manufacturer will be assigned automatically.


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"
}

Information updating on Manufacturer with name „NewManufacturer2“

PUT /manufacturer/{manufacturerID} Update Manufacturer - is used for information editing on Manufacturer

manufacturerId - specify Manufacturer ID
Specify name of Manufacturer in the „Name“ field.


Curl

curl -X 'DELETE' \
  'https://719.eu6.ysell.pro/api/v1/manufacturer/22' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer '

Information deleting about Manufacturer with ID „22“

Delete /manufacturer/{manufacturerID} Delete Manufacturer

Marketplace

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"
  },
 ]
Operations with marketplaces

GET /marketplace Return all marketplaces - returns information on connected to the Client marketplaces










Order

Operations with orders

Curl

curl -X 'GET' \
  'https://719.eu6.ysell.pro/api/v1/order?sort=o-719-67&page=1' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer '

Get /order Returns order - is used for getting information on order


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 - is used for creating a new order

id - order ID. If the box „Send empty value“ is checked ID is generated automatically.

status_id - Status order ID. Check „Send empty value“ box to set status automatically

company_id - Company ID on ysell.pro

platform - platform that will be used for order creation

platform_order_id - order Id on the platform

purchase_date - order purchase date

payment_date - order payment date

latest_ship_date - the last time period for order sending

currency - currency

ship_name - receiver's name

ship_email - receiver's email address

ship_addr1 - reciever's address

ship_city - receiver's city

ship_postal_code - receiver's postal code

ship_country - receiver's country

ship_phone_number - receiver's phone number

Curl

curl -X 'GET' \
  'https://719.eu6.ysell.pro/api/v1/order/75' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer '

Getting information on the order with ID 75

GET /order/{ID} Return order by ID - is used for return information on the order

ID - indicate order ID


Curl

curl -X 'DELETE' \
  'https://719.eu6.ysell.pro/api/v1/order/60' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer '

Getting information on the order with ID 75

Delete /order/{ID} Delete Order by ID - is used for order deleting

ID - enter order ID


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"
}
 

Adding product to order with ID 70

Post /order-item Create new order item - is used for adding position to the order

order_id - indicate order ID

asin - ASIN of the product

p_id - product ID

product_name - name of the product

sku - SKU of the product

qty - quantity of product in the order

item_price - price of a unit

Shipments

Operations with shipments

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": []
  },
 

Getting information on shipment 719-1

GET /prep-shipment Get prep shipment list - используется получения информации о отправке с Преп-центра. is used for getting information on shipment from the Prep Center

company_id - company ID

shipment_num - number of the shipment

shipment_type - type of the shipment

shipment_type_description - description of the shipment type

status - status of the shipment

status_description - description of the shiment status

total_cost - price for the shipment processing

declared_qty - quantity of product units indicated by client

declared_box_qty - quantity of boxes with product indicated by client

processed_qty - quantity of product processed by the Prep Center

messages - text of memo to shipment
  • de/api_start.1656421184.txt.gz
  • Zuletzt geändert: 2022/06/28 14:59
  • von simon