תמצית :ה XML מפרט כלל המוצרים המופיעים בכל מסמך ,כאשר כל מוצר מופיע במקטע נפרד. הממשק נדרש לשדר את נתוני המסמכים שהופקו ביום קודם ורלוונטיים ללקוח X
2. מבנה ה XML :
• Package = מספר חבילות
• Quantity = מס' יחידות בכל חבילה
• Item_Sku= מק"ט
• Value date = תאריך מסמך
• reference_date = תאריך ערך
• supply_date = תאריך אספקה
• supply_time = שעת אספקה , לא חובה , ניתן להשאיר ערך קבוע 00:00
• account_code = מספר לקוח אצל הספק
• doc_type = סוג מסמך חשבונית / ת.משלוח
• doc_num = מספר מסמך
• Price = מחיר המוצר
• Remarks = הערות
דוגמא :
3 27
לחמא00905
2020-12-07
2020-12-07
2020-12-08
00:00
23101
11
193320
10
הערה להזמנה : זאת הזמנה לתת לאוריאל במפעל
1 40
הבלקן8386
2020-12-07
2020-12-07
2020-12-08
00:00
23101
11
193320
הערה להזמנה : זאת הזמנה לתת לאוריאל במפעל
באמצעות ממשק זה ניתן להוסיף או לעדכן מוצרים במחירון קיים, לפי קוד לקוח, מזהה מחירון ומערך של מוצרים הכולל מק״ט ומחיר לאחר הנחה.
Endpoint
Method: POST
Url for production: https://suppliers.restigo.co.il/api/departments/thirdParty/pricings/items
Url for development: https://suppliers-dev.restigo.co.il/api/departments/thirdParty/pricings/items
Request
key | value |
token (header) | Provided separately |
pricing_id (מזהה מחירון) | Required | integer |
customer_number (קוד לקוח) | Required | string |
items (מוצרים) | Required | array |
items.catalog_number (מק״ט מוצר) | Required | string |
items.price_after_discount (מחיר מוצר לאחר הנחה) | Required | number |
המפתח שנשלח מקושר לספק ספציפי וניתן פרטנית.
Request Example:
{
"pricing_id": 4515,
"customer_number": "556781",
"items": [
{
"catalog_number": "100106",
"price_after_discount": 32
},
{
"catalog_number": "0101",
"price_after_discount": 55
},
{
"catalog_number": "100105",
"price_after_discount": 21.6
}
]
}
Response
Success Response
Status Code: 201 Created
Example Response
{
"message": "success",
"items_added": [
"100106"
],
"items_updated": [
"0101",
"100105"
]
}
Error Response
Unauthorized Request
Status Code: 401
Example Response
{
"message": "token not found"
}
באמצעות ממשק זה ניתן להסיר לקוח ממחירון באמצעות מזהה מחירון וקוד לקוח.
Endpoint
Method: DELETE
Url for production: https://suppliers.restigo.co.il/api/departments/thirdParty/pricings/removeClient
Url for development: https://suppliers-dev.restigo.co.il/api/departments/thirdParty/pricings/removeClient
Request
Headers
key | value |
token | Provided separately |
pricing_id (מזהה מחירון) | Required | integer |
customer_number (קוד לקוח) | Required | string |
המפתח שנשלח מקושר לספק ספציפי וניתן פרטנית.
Response
Success Response
Status Code: 200 Ok
Example Response
{
"message": "Client has been successfully removed from the pricing"
}
Error Response
Unauthorized Request
Status Code: 401
Example Response
{
"message": "token not found"
}
באמצעות ממשק זה ניתן להסיר מוצרים ממחירון קיים, לפי קוד לקוח, מזהה מחירון ומערך של מק״טים של מוצרים.
Endpoint
Method: DELETE
Url for production: https://suppliers.restigo.co.il/api/departments/thirdParty/pricings/items
Url for development: https://suppliers-dev.restigo.co.il/api/departments/thirdParty/pricings/items
Request
key | value |
token (header) | Provided separately |
pricing_id (מזהה מחירון) | Required | integer |
customer_number (קוד לקוח) | Required | string |
items (מק״טים של מוצרים) | Required | array |
המפתח שנשלח מקושר לספק ספציפי וניתן פרטנית.
Request Example:
{
"pricing_id": 5544,
"customer_number": "123",
"items": ["0101", "100105", "100106"]
}
Response
Success Response
Status Code: 200 OK
Example Response
{
"message": "success",
"items_deleted": [
"0101",
"100105",
"100106"
]
}
Error Response
Unauthorized Request
Status Code: 401
Example Response
{
"message": "token not found"
}
באמצעות ממשק זה ניתן ליצור מחירון לספק בהינתן שם.
Endpoint
Method: POST
Url for production: https://suppliers.restigo.co.il/api/departments/thirdParty/pricings
Url for development: https://suppliers-dev.restigo.co.il/api/departments/thirdParty/pricings
Request
Headers
key | value |
token | Provided separately |
name (שם מחירון) | Required | string |
המפתח שנשלח מקושר לספק ספציפי וניתן פרטנית.
Response
Success Response
Status Code: 201 Created
Example Response
{
"pricing_id": 123,
"pricing_name": "testname"
}
Error Response
Unauthorized Request
Status Code: 401
Example Response
{
"message": "token not found"
}
באמצעות ממשק זה ניתן לשלוף מידע על לקוח קיים, כולל שם ומזהה סניף, מחירונים המשויכים אליו וכן משתמשים המקושרים אליו – כל זאת על בסיס קוד הלקוח.
Endpoint
Method: GET
Url for production: https://suppliers.restigo.co.il/api/departments/thirdParty/clients
Url for development: https://suppliers-dev.restigo.co.il/api/departments/thirdParty/clients
Request
Headers
key | value |
token | Provided separately |
customer_number (קוד לקוח) | Required | string |
המפתח שנשלח מקושר לספק ספציפי וניתן פרטנית.
בעזרת ממשק זה ניתן לקבל רשימת מוצרים פעילים של הספק.
Endpoint
Method: GET
Url for production: https://suppliers.restigo.co.il/api/departments/thirdParty/items
Url for development: https://suppliers-dev.restigo.co.il/api/departments/thirdParty/items
Request
Headers
key | value |
token | Provided separately |
item_name | Nullable | string |
המפתח שנשלח מקושר לספק ספציפי וניתן פרטנית.
Response
Success Response
Status Code: 200 Ok
Example Response
[
{
"item_id": 1,
"item_name": "מוצר 1"
},
{
"item_id": 2,
"item_name": "מוצר 2"
},
{
"item_id": 3,
"item_name": "מוצר 3"
},
{
"item_id": 4,
"item_name": "מוצר 4"
},
]
Error Response
Unauthorized Request
Status Code: 401
Example Response
{
"message": "token not found"
}
בעזרת ממשק זה ניתן לקבל את רשימת המחירונים של הספק, כולל הלקוחות והמוצרים המשויכים לכל מחירון.
Endpoint
Method: GET
Url for production: https://suppliers.restigo.co.il/api/departments/thirdParty/pricings
Url for development: https://suppliers-dev.restigo.co.il/api/departments/thirdParty/pricings
Request
Headers
key | value |
token | Provided separately |
pricing_name | Nullable | string |
המפתח שנשלח מקושר לספק ספציפי וניתן פרטנית.
Response
Success Response
Status Code: 200 Ok
Example Response
[
{
"pricing_id": 123,
"pricing_name": "שם מחירון",
"clients": [
{
"client_id": 1,
"client_name": "שם לקוח 1"
},
{
"client_id": 2,
"client_name": "שם לקוח 2"
}
],
"catalog_items": [
{
"item_name": "שם מוצר 1",
"item_id": 435,
"price_after_discount": 112
},
{
"item_name": "שם מוצר 2",
"item_id": 436,
"price_after_discount": 159
},
]
}
]
Error Response
Unauthorized Request
Status Code: 401
Example Response
{
"message": "token not found"
}