# Rakmao X Seller Center ## Preparing Connection ### Rakmao Environment | Name | Endpoint | AuthString | Username | Password | | ---------- | --------------------------------- | ------------------------------------------------------------------------ | ------------ | ------------- | | Test | https://rakmao-api-test.builk.com | eyJVc2VyTmFtZSI6IlNDRy1SdWR5IiwiUGFzc3dvcmQiOiJmeUZzZXNtOWI3cTUifQ== | SCG-Rudy | fyFsesm9b7q5 | | Staging | https://apiprototype.rakmao.com | eyJVc2VyTmFtZSI6IlNDRy1SdWR5IiwiUGFzc3dvcmQiOiJmeUZzZXNtOWI3cTUifQ== | SCG-Rudy | fyFsesm9b7q5 | | Production | https://api.rakmao.com | eyJVc2VyTmFtZSI6IlNlbGxlckNlbnRlciIsIlBhc3N3b3JkIjoiVFV2VmRXVDdzM3lnViJ9 | SellerCenter | TUvVdWT7s3ygV | ### RakmaoBuyNow Environment | Name | Endpoint | | ---------- | --------------------------------- | | Test | https://rakmao-shop-api-test.builk.com | | Staging | | | Production | https://api-shop.rakmao.com | > ใช้ authString ทำการขอ AccessToken ที่ {Environment}/api/v1/Authentication/RequestAPIToken เพื่อรับสิทธิ์ในการติดต่อ API ข้างล่างนี้ (สำหรับ RakmaoBuynow ทำการขอ AccessToken ที่ Rakmao) ### Seller Center Environment | Name | Endpoint | Description | | --------- | -------------------------------------- |-------------| | Test |https://test-seller-center-api.merudy.com/public/new/ |Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBuYW1lIjoicmFrbW9hIiwidXNlcm5hbWUiOiJyYWttb2EiLCJwYXNzd29yZCI6InkkbFUjUll3WDdBIyIsImF1dGhfdHlwZSI6InJ1ZHlfcmFrbW9hIiwic2FsdCI6IiQyeSQxMiRyMTh1cEw2c29lcnA3NDJEdHoyZTl1Y2xHZXZKa0dzeDFIN3lMMjg5eGhxaWVtTXF6MUdNNiJ9.jh7KC9XUsN273B6BrtS8TuPa9nf6ycPTgBAjl5WfGWo | | Staging |https://prototype-backoffice-api.merudy.com/public/new/ |Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBuYW1lIjoicmFrbW9hIiwidXNlcm5hbWUiOiJyYWttb2EiLCJwYXNzd29yZCI6InkkbFUjUll3WDdBIyIsImF1dGhfdHlwZSI6InJ1ZHlfcmFrbW9hIiwic2FsdCI6IiQyeSQxMiRyMTh1cEw2c29lcnA3NDJEdHoyZTl1Y2xHZXZKa0dzeDFIN3lMMjg5eGhxaWVtTXF6MUdNNiJ9.jh7KC9XUsN273B6BrtS8TuPa9nf6ycPTgBAjl5WfGWo | | Production |https://seller-center-api.merudy.com/public/new/ |Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBuYW1lIjoicmFrbW9hIiwidXNlcm5hbWUiOiJyYWttb2EiLCJwYXNzd29yZCI6InkkbFUjUll3WDdBIyIsImF1dGhfdHlwZSI6InJ1ZHlfcmFrbW9hIiwic2FsdCI6IiQyeSQxMiRyMTh1cEw2c29lcnA3NDJEdHoyZTl1Y2xHZXZKa0dzeDFIN3lMMjg5eGhxaWVtTXF6MUdNNiJ9.jh7KC9XUsN273B6BrtS8TuPa9nf6ycPTgBAjl5WfGWo | ### Commom response model > เป็น model ที่นำไปใช้ในการตอบกลับของทุกๆ API และจะละเว้นการอธิบาย model นี้ในทุกๆ API ต่อไป | Parameter | Description | Schema | | --------- | -------------------------------------- |-------------| | Data | ค่าที่ตอบกลับจากการทำงานของAPI นั้นๆ (ไม่มีการตอบกลับอนุญาติให้เป็น null) | Object | | Status | สถานะการทำงานของ API นั้นๆ โดยหมวด 2xx คือทำงานปกติ 4xx คือข้อมูลบ้างอย่างไม่ถูกต้อง และ 5xx เป็นการทำงานผิดปกติของทาง API โดยถ้าได้รับ status หมวด 5xx สามารถแจ้งทีมงานเพื่อตรวจสอบได้ | Integer | | Messge | คำอธิบายขยายความของ Status เบื้องต้น โดยหมวด 2xx จะเป็น success 4xx ส่วนใหญ่จะเป็นข้อบงชี้ของข้อมูลที่ไม่ถูกต้อง และ 5xx จะเป็น error ของตัวระบบ | String | ### Conversation Agreement #### DataType | Type | Description | | --------- | ----------- | | DateTime | จะส่งค่าเป็น string ที่เป็นtimezone utc +0 และมี format เป็น 'yy-MM-dd HH:mm:ss' (example : "2021-09-29 00:01:02") | ### Expect value #### Addreess Code > ตามที่ทาง seller center ส่ง master data มา #### PaymentMethodEnum | Key | Value | | ------ | ----- | | Cash | 1 | | Credit | 2 | | Other | 3 | | Saison Credit | 4 | | Pah | 5 | | Paysoon | 6 | #### RFQStatusEnum | Key | Value | | -------------- | ----- | | Draft | 0 | | Expire | 1 | | Inprogress | 2 | | Negotiate | 3 | | Complete | 4 | | CancelByBuyer | 5 | | CancelBySeller | 6 | | Award | 7 | | Closed | 8 | #### QuotationStatusEnum | Key | Value | | -------------- | ----- | | InProgress | 1 | | Expire | 2 | | Negotiate | 3 | | CancelBySeller | 4 | | Win | 5 | | Lose | 6 | #### TaxTypeEnum | Key | Value | | ---------- | ----- | | ExcludeVat | 1 | | IncludeVat | 2 | | NoVat | 3 | #### DeliveryMethodType | Key | Value | | ---------- | ----- | | Pickup | 1 | | Delivery | 2 | #### RFQProjectTypeEnum | Key | Value | | -------------- | ----- | | Billloader-PJM | 1 | | Rakmao | 2 | | Builk | 3 | #### DiscountTypeEnum | Key | Value | | -------------- | ----- | | Number | 1 | | Percentage | 2 | #### ResponseStatusEnum | Key | Value | | -------------- | ----- | | Approved | 1 | | Reject | 2 | | Auto Reject | 3 | #### AdjustItemStatusEnum | Key | Value | | -------------- | ----- | | None | 1 | | Added | 2 | | Deleted | 3 | #### BuynowOrderCancelEnum | Name | Value | | ------------------ | ----- | | BuyerRequestCancel | 1 | | SellerRequestCancel| 2 | | BuyerCancel | 3 | | SellerCancel | 4 | | AcceptCancel | 5 | | RejectCancel | 6 | #### BuynowOrderCreateType | Key | Value | | ---------- | ----- | | Product | 1 | | OfferQuotation | 2 | #### BuynowQuotationType | Key | Value | | ---------- | ----- | | Buynow | 1 | | Request to buy | 2 | | Buynow plus | 3 | #### BuyerType | Key | Value | | ---------- | ----- | | Internal | 1 | | Guest | 2 | ## Rakmao To Seller Center > รายละเอียดของ API ดังต่อไปนี้จะเป็นข้อมูลที่ทาง Rakmao จะจัดส่งให้ ซึ่งทาง Seller Center สามารถร้องของข้อมูลเพิ่มเติมนอกนอกเนื่องจากตัวเอกสารนี้ได้ โดยทางเราจะปรับปรุง อัพเดท และจะแจ้งให้ทราบเมื่อดำเนินการเสร็จสิ้น > ### `POST sellerCenter/SendRFQToPlatForm/api` `เดิมใช้ชื่อว่า POST /{PATH}/{TO}/{API}/SendRFQDetail` **Body Request** | Parameter | Description | Schema | | -------------------------------------------------- | ------------------------------------------- | --------------- | | RFQRefId (*required*) | Id RFQ ของทาง Rakmao | GuId | | OrganizationName (*required*) | ชื่อองค์กรที่ร้องขอ | String | | ProjectName (*required*) | ชื่อโครงการที่ร้องขอ | String | | [PaymentMethod](#PaymentMethodEnum) (*required*) | รูปแบบการชำระเงิน | Integer | | PaymentCreditDay | จะระบุ ถ้าเป็นรูปแบบการชำระเงิน credit term | Integer | | [DeliveryMethod](#DeliveryMethodType) (*required*) | รูปแบบการจัดส่ง | Integer | | DeliveryDetail | ที่อยู่ในการจัดส่ง | Object | | DueDate (*required*) | วันสิ้นสุดการส่งประกวดราคา | DateTime | | Remark | หมายเหตุของเอกสาร | String | | [RFQStatus](#RFQStatusEnum) (*required*) | สถานะปัจจุบันของเอกสาร | Integer | | IsPublicAuction | ระบุบรูปแบบของการประกวดราคาสาธารณะ | boolean | | PurchaseOrderItem (*required*) | รายการสินค้าที่ต้องการจัดซื้อ | Array of Object | | PreferredVendorList | รายการผู้ขายที่เจาะจงจะทำการประกวดราคาด้วย | Array of String | | DeliveryDate | วันที่ต้องการให้จัดส่ง | String | | ContactName | ชื่อผู้ติดต่อ | String | | ContactEmail | อีเมลผู้ติดต่อ | String | | ContactPhone | หมายเลขโทรศัพท์ | String | | ContactLineId | ไลน์ไอดีผู้ติดต่อ | String | | TaxId | เลขประจำตัวผู้เสียภาษี | String | | RFQCode | รหัส RFQ code ของ PJM,Builk,Rakmao | String | | AttachedFileList | รายการไฟล์แนบ | Array of object | | [RFQProjectType](#RFQProjectTypeEnum) | buyer ที่สร้าง Rfq | Integer | | LocationUrl | Url สำหรับตำแหน่งที่ตั้งโครงการ | string | **DeliveryDetail Object** | Parameter | Description | Schema | | ------------------------- | ----------- | ------ | | Address | | String | | SubDistric | | String | | Distric | | String | | Province | | String | | PostCode | | String | **PurchaseOrderItem Object** | Parameter | Description | Schema | | --------------------------- | ----------- | ------ | | CategoriesName (*required*) | | String | | CategoriesRefId (*required*) | | Number | | ItemName(*required*) | | String | | ItemRefId (*required*) | | String | | Quantity (*required*) | | Number | | Unit (*required*) | | String | | Line | | Number | | IsPromotional | | Boolean | **AttachedFileList Object** | Parameter | Description | Schema | | ------------------------- | ----------- | ------ | | AttachedFileName | | String | | AttachedFileLink | | String | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "RFQRefId": "491482c2-6d89-4511-9cd3-aed095853663", "OrganizationName": "Test OrganizationName", "ProjectName": "Test ProjectName", "PaymentMethod": 1, "PaymentCreditDay": 0, "DeliveryMethod": 1, "DeliveryDetail": { "Address":"No. 1624/2 New Phetburi Road", "SubDistric":"Makkasan ", "Distric":"Ratchathewi", "Province":"Bangkok", "PostCode":"10400" }, "DueDate": "2021-05-19 06:11:16", "Remark": "Test remark", "RFQStatus": 1, "IsPublicAuction": true, "DeliveryDate": "2021-05-19 06:11:16", "ContactName": "เทส" , "ContactEmail": "example@domaim.com" , "ContactPhone":"0892222222", "ContactLineId": "abc", "TaxId":"1234657891011", "PurchaseOrderItem" : [ { "CategoriesName":"Material", "CategoriesRefId":1, "ItemName":"Oriharukon", "ItemRefId":"c6f5d09c-7e2c-46aa-a80a-ff8c706069ad", "Quantity":10, "Unit":"doz" "Line": 1 }, { "CategoriesName":"Iron", "CategoriesRefId":2, "ItemName":"Mithril", "ItemRefId":"c6f5d09c-7e2c-46aa-a80a-ff8c706069ad", "Quantity":10, "Unit":"doz" "Line": 2 } ], "PreferredVendorList" : ["1","2"], "AttachedFileList": [ { "AttachedFileName":"test.pdf", "AttachedFileLink":"url/to/file" }, { "AttachedFileName":"test.pdf", "AttachedFileLink":"url/to/file" } ], "RFQProjectType": 2, "LocationUrl": "url/location" } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST sellerCenter/SendReviseItem/api` > API นี้จะทำการส่งรายการของสินค้าที่ผู้ซื้อต้องการต่อรองราคา **Body Request** | Parameter | Description | Schema | | ------------------------------ | -------------------------------- | --------------- | | RFQRefId (*required*) | Id RFQ ของ Rakmao | GuId | | QuotationId (*required*) | Id Quotation ของ Seller Center | String | | Note | | String | | PurchaseOrderItem (*required*) | รายการรหัสสินค้าที่ต้องการต่อรอง | Array of Object | **PurchaseOrderItem Object** | Parameter | Description | Schema | | ---------------------- | -------------------- | ------ | | ItemRefId (*required*) | | String | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "RFQRefId": "491482c2-6d89-4511-9cd3-aed095853663", "QuotationId": ".... ", "Note": "Test note", "PurchaseOrderItem" : [ { "ItemRefId":"c6f5d09c-7e2c-46aa-a80a-ff8c706069ad" }, { "ItemRefId":"c6f5d09c-7e2c-46aa-a80a-ff8c706069ad" } ] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST sellerCenter/CancelRFQ/api` > API นี้จะทำการส่งสถานยกเลิกเอกสาร RFQ **Body Request** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | RFQRefId (*required*) | Id RFQ ของทาง Rakmao | GuId | | CancelReasons | | String | | CancelDateTime (*required*) | เวลาที่ต้องการยกเลิก | DateTime | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "RFQRefId": "491482c2-6d89-4511-9cd3-aed095853663", "CancelReasons": "Test note", "CancelDateTime" : "2021-05-19T06:11:16.3929186Z" } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST sellerCenter/UpdateQuotationStatus/api` > API นี้จะทำการอัพเดทสถานะของใบเสนอราคาของ Vendor **Body Request** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | RFQRefId (*required*) | Id RFQ ของทาง Rakmao | GuId | | UpdateDate (*required*) | | DateTime | | Quotations (*required*) | ใบเสนอราคา | Array of Object | **Quotations Object** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | QuotationId (*required*) | Id Quotation ของ Seller Center | String | | [Status](#QuotationStatusEnum) (*required*) | สถานะของใบเสนอราคาที่เปลี่ยนแปลงไป | Integer | | Reasons | เหตุผลที่ win/lose | String | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "RFQRefId": "491482c2-6d89-4511-9cd3-aed095853663", "UpdateDate": "2021-05-19T06:11:16.3929186Z", "Quotations" : [ { "QuotationId":"0fba0f3f-cb12-4de3-b8ff-e3cf2b5890ef", "Status": 1, "Reasons":"Win because" }, { "QuotationId":"0fba0f3f-cb12-4de3-b8ff-e3cf2b5890ef", "Status": 2, "Reasons":"Lost because" } ] } ``` ### `POST sellerCenter/UpdateRFQStatus/api` > API นี้จะทำการอัพเดทสถานะของใบ RFQ **Body Request** | Parameter | Description | Schema | | -------------------------------------- | ----------------------------- | -------- | | RFQRefId (*required*) | Id RFQ ของทาง Rakmao | GuId | | UpdateDate (*required*) | | DateTime | | [Status](#RFQStatusEnum) (*required*) | สถานะของ RFQ ที่เปลี่ยนแปลงไป | Integer | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "RFQRefId": "491482c2-6d89-4511-9cd3-aed095853663", "UpdateDate": "2021-05-19T06:11:16.3929186Z", "Status" : 6 } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST sellerCenter/SendPurchaseOrderDocumentForm/api` > API นี้จะทำการอัพเดทสถานะของใบ RFQ **Body Request** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | RfqRefId (*required*) | Id Rfq ของทาง Rakmao | GuId | | QuotationId (*required*) | Id Quotations ของทาง Seller Center | String | | PurchaseOrderDocument (*required*) | url สำเนาเอกสารอีเล็กทรอนิคของ PurchaseOrder | String | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "RfqRefId": "72509f30-9ce1-44ac-b3ce-64d47ec1f680", "QuotationId": "990", "PurchaseOrderDocument" : "https://storage.googleapis.com/buyer-rakmao/path/to/file" } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST sellerCenter/PreferredVender/api` > API ค้นหา Preferred Vender ของ Seller (ตอนนี้ builk ใช้หน้า RFQ) **Body Request** | Parameter | Description | Schema | | --------------------------- | -------------------------- | -------- | | VendorName | ชื่อ Seller | String | | VendorEmail | อีเมล์ของ Seller | String | | TaxId | รหัสประจำตัวผู้เสียภาษี | String | | IdCardNumber | รหัสบัตรประชาชน | String | | Province | จังหวัด | String | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | Array | #### Example Request ```json { "Search":"กรุงเทพ" } ``` #### Example Response ```json { "return_data": { "status": 200, "Message": "success", "Data": [ { "VendorId": "1-1", "VendorName": "sname1", "VendorEmail": "sname1@test.com", "VendorType": "company", "TaxId": "1201230001310", "IdCardNumber": "1201230001310", "Province": "กรุงเทพมหานคร" }, { "VendorId": "1-7", "VendorName": "thanat", "VendorEmail": "thanat.k@merudy.com", "VendorType": "company", "TaxId": "1111111111111", "IdCardNumber": "1111111111111", "Province": "กรุงเทพมหานคร" } ] }, "ret": { "error": 0, "msg": "success", "time": 0.0562, "size": 597 } } ``` ### `POST sellerCenter/ResponseInquiry/api` > API นี้จะทำการตอบกับรายการที่ร้องข้อ Inquiry และข้อมูล RFQ ที่เปลี่ยนแปลง **Body Request** | Parameter | Description | Schema | | -------------------------------------------------- | ------------------------------------------ | --------------- | | RfqRefId (*required*) | Id RFQ ของทาง Rakmao | GuId | | QuotationId (*required*) | รายการ Id Quotation หรือ Draft quotation ของ Seller | Array of String | | DeliveryDetail | ที่อยู่ในการจัดส่ง | Object | | Remark | หมายเหตุของเอกสาร | String | | PurchaseOrderItem | รายการสินค้า | Array of Object | **DeliveryDetail Object** | Parameter | Description | Schema | | ---------- | ----------- | ------ | | Address | | String | | SubDistric | | String | | Distric | | String | | Province | | String | | PostCode | | String | | LocationUrl | Url สำหรับตำแหน่งที่ตั้งโครงการ | string | **PurchaseOrderItem Object** | Parameter | Description | Schema | | --------------------------- | ----------- | ------ | | ItemName | | String | | ItemRefId | | String | #### Example Request ```json { "RfqRefId": "72509f30-9ce1-44ac-b3ce-64d47ec1f680", "QuotationId": ["990","00-1"], "Remark":"... ... ... ", "DeliveryDetail" : { "Address":"No. 1624/2 New Phetburi Road", "SubDistric":"Makkasan ", "Distric":"Ratchathewi", "Province":"Bangkok", "PostCode":"10400", "LocationUrl": "url/location" }, "PurchaseOrderItem" : [ { "ItemName":"Mithril", "ItemRefId":"c6f5d09c-7e2c-46aa-a80a-ff8c706069ad", } ] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST sellerCenter/SendExtendDueDateRFQ/api` > API เส้นนี้จะแจ้ง สถานะ RFQ ใหม่ วันที่เปิดรับของ RFQ และ วันที่จัดส่งสินค้า **Body Request** | Parameter | Description | Schema | | -------------------------------------- | ----------------------------- | -------- | | RFQRefId (*required*) | Id RFQ ของทาง Rakmao | GuId | | DueDate (*required*) | วันสิ้นสุดการส่งประกวดราคา | DateTime | | DeliveryDate | วันที่ต้องการให้จัดส่ง | DateTime | | UpdateDate (*required*) | วันที่มีการเปลี่ยนข้อมูล | DateTime | | [Status](#RFQStatusEnum) (*required*) | สถานะของ RFQ ที่เปลี่ยนแปลงไป | Integer | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "RFQRefId": "491482c2-6d89-4511-9cd3-aed095853663", "Status" : 6, "UpdateDate": "2022-03-10T06:11:16.3929186Z", "DeliveryDate": "2022-05-01T00:00:00.000000Z", "DueDate": "2022-04-16T00:00:00.000000Z", } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST sellerCenter/ServiceArea/api` > API ค้นหา Service Area Vender ของ Seller **Body Request** | Parameter | Description | Schema | | --------------------------- | -------------------------- | -------- | | Provinces | จังหวัด | Array | | Search | VendorName, Taxid, email, id card number | String | | page | หน้า | String | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | Array | #### Example Request ```json { "Provinces" : ["กรุงเทพมหานคร"], "Search" : "Rakmao South", "page" : "1" } ``` #### Example Response ```json { "res": { "Status": 200, "Message": "Success", "Data": { "items": [ { "VendorId": "1-1", "VendorName": "sname1", "VendorEmail": "sname1@test.com", "VendorType": "company", "TaxId": "1201230001310", "IdCardNumber": "1201230001310", "SellerProvince": "กรุงเทพมหานคร", "Provinces": [ "เชียงใหม่" ] }, { "VendorId": "1-4", "VendorName": "sname4", "VendorEmail": "sname4@test.com", "VendorType": "company", "TaxId": "333", "IdCardNumber": "222", "SellerProvince": "สุราษฎร์ธานี", "Provinces": [ "เชียงใหม่" ] }, { "VendorId": "1-23", "VendorName": "หจก.กนกวรรณค้าวัสดุภัณฑ์", "VendorEmail": "kanokwan.r@gmail.com", "VendorType": "company", "TaxId": "1894562315778", "IdCardNumber": "1849900279080", "SellerProvince": "สมุทรปราการ", "Provinces": [ "เชียงใหม่" ] }, { "VendorId": "1-38", "VendorName": "Helltaker company", "VendorEmail": "wannapon@builk.com", "VendorType": "company", "TaxId": "0000000000013", "IdCardNumber": "1110300217126", "SellerProvince": "กรุงเทพมหานคร", "Provinces": [ "เชียงใหม่" ] }, { "VendorId": "1-46", "VendorName": "Manit Test", "VendorEmail": "manitkhu@scg.com", "VendorType": "company", "TaxId": "1869900113448", "IdCardNumber": "1869900113448", "SellerProvince": "กรุงเทพมหานคร", "Provinces": [ "เชียงใหม่" ] }, { "VendorId": "1-60", "VendorName": "บริษัท เทสรักเหมา จำกัด", "VendorEmail": "pppalitapp@gmail.com", "VendorType": "company", "TaxId": "0909090909090", "IdCardNumber": "0909090909090", "SellerProvince": "กรุงเทพมหานคร", "Provinces": [ "เชียงใหม่" ] }, { "VendorId": "1-63", "VendorName": "Test-Dev", "VendorEmail": "testseller.pjm@gmail.com", "VendorType": "company", "TaxId": "0202020202020", "IdCardNumber": "0202020202020", "SellerProvince": "กรุงเทพมหานคร", "Provinces": [ "เชียงใหม่" ] }, { "VendorId": "1-64", "VendorName": "Test-Dev1", "VendorEmail": "testseller.pjm1@gmail.com", "VendorType": "company", "TaxId": "0303030303030", "IdCardNumber": "0303030303030", "SellerProvince": "สมุทรปราการ", "Provinces": [ "เชียงใหม่" ] }, { "VendorId": "1-65", "VendorName": "Test-Dev2", "VendorEmail": "testseller.pjm2@gmail.com", "VendorType": "company", "TaxId": "0404040404040", "IdCardNumber": "0404040404040", "SellerProvince": "กรุงเทพมหานคร", "Provinces": [ "เชียงใหม่" ] }, { "VendorId": "1-66", "VendorName": "Test-Dev3", "VendorEmail": "testseller.pjm3@gmail.com", "VendorType": "company", "TaxId": "0505050505050", "IdCardNumber": "0505050505050", "SellerProvince": "กรุงเทพมหานคร", "Provinces": [ "เชียงใหม่" ] } ], "total": 37, "total_pages": 4 } } } ``` ### `POST sellerCenter/ViewerBuyer/api` > API เส้นนี้ตอบกลับเมื่อ Buyer เปิดดูราคาที่ seller เสนอเข้าไป **Body Request** | Parameter | Description | Schema | | --------------------------- | -------------------------- | -------- | | RfqRefId (*required*) | Id RFQ ของทาง Rakmao | GuId | | QuotationId (*required*) | รายการ Id Quotation ของ Seller | Array of String | | ViewDateTime (*required*) | เวลาที่กดเข้ามาดูใบ RFQ | DateTime | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | Array | #### Example Request ```json { "RfqRefId": "72509f30-9ce1-44ac-b3ce-64d47ec1f680", "QuotationId": ["1-11111","1-222222"], "ViewDateTime" : "2022-10-10 17:01:32" } ``` #### Example Response ```json { "res": { "Status": 200, "Message": "Success", "Data": true } ``` ### `POST sellercenter/SendAdjustBeforePoDocument/api` > API เส้นนี้จะส่งข้อมูลการแก้ไขก่อนที่จะออก PO **Body Request** | Parameter | Description | Schema | | ---------------------------------------------------- | ---------------------------------- | -------- | | RFQRefId (*required*) | Id RFQ ของทาง Rakmao | Guid | | VendorRefId (*required*) | Id vendor ของทาง Rakmao | Guid | | QuotationRefId (*required*) | Id quotations ของทาง Rakmao | Guid | | QuotationId (*required*) | Id quotations ของทาง Seller Center | String | | ItemCount (*required*) | จำนวนสินค้า(ไม่รวมสินค้าที่ถูกลบไปแล้ว) | Number | | SubTotal (*required*) | ราคารวมของสินค้า | Number | | Discount (*required*) | ยอดส่วนลด | Number | | DueDate (*required*) | วันสิ้นสุดการตอบรับการแก้ไข | String | | BeforeTax (*required*) | ราคาก่อนคำนวณภาษี | Number | | TaxValue (*required*) | อัตราภาษี | Number | | GrandTotalShippingPrice (*required*) | ราคาค่าขนส่งรวมภาษี | Number | | ShippingPrice (*required*) | ราคาค่าขนส่ง | Number | | GrandTotal (*required*) | ราคารวมสุทธิ | Number | | GrandTotalWithShipping (*required*) | ราคาสุทธิรวมค่าขนส่ง | Number | | AdjustBeforePoItem (*required*) | รายการสินค้าที่ประกวดราคา | Object | **AdjustBeforePoItem Object** | Parameter | Description | Schema | | --------------------------- | ----------- | ------ | | CategoryName (*required*) | | String | | CategoryRefId (*required*) | | Number | | ItemName(*required*) | | String | | AdjustItemRefId (*required*) | | Guid | | ItemRefId (*required*) | | Guid | | Quantity (*required*) | | Number | | Unit (*required*) | | String | | Total (*required*) | | Number | | Price (*required*) | | Number | | Line (*required*) | | Number | | [ItemStatus](#AdjustItemStatusEnum) (*required*) | | Number | | IsPromotional (*required*) | | Boolean | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | Boolean | #### Example Request ```json { "RFQRefId": "491482c2-6d89-4511-9cd3-aed095853663", "VendorRefId": "491482c2-6d89-4511-9cd3-aed095853663", "QuotationRefId": "491482c2-6d89-4511-9cd3-aed095853663", "QuotationId": "1", "ItemCount": 2, "TaxValue" : 0, "BeforeTax": 2500, "SubTotal": 2500, "ShippingPrice": 50, "Discount": 0, "GrandTotal": 2550, "GrandTotalWithShipping": 3450, "GrandTotalShippingPrice" : 50, "AdjustBeforePoItem": [ { "CategoryName":"Material", "CategoryRefId":1, "ItemName":"Oriharukon", "AdjustItemRefId": "8b110a40-b345-40e5-8139-14bb9d914ced" "ItemRefId":"c6f5d09c-7e2c-46aa-a80a-ff8c706069ad", "Quantity":10, "Unit":"doz", "Total": 20.00, "Price": 2.00, "Line": 1, "ItemStatus": 1, "IsPromotional": true }, { "CategoryName":"Material", "CategoryRefId":1, "ItemName":"Inuyasha", "AdjustItemRefId": "cd5f3128-bf80-43b1-ac1f-4d3a46eade27" "ItemRefId": "00000000-0000-0000-0000-000000000000", "Quantity":10, "Unit":"doz", "Total": 50.00, "Price": 5.00, "Line": 2, "ItemStatus": 2, "IsPromotional": false } ] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST sellerCenter/UploadEDocument/api` > API เพื่ออัพโหลดเอกสารข้อตกลง, invoice **Body Request** | Parameter | Description | Schema | | --------------------------- | -------------------------- | -------- | | Type (*required*) | ประเภทของเอกสาร | int | | EDocuments (*required*) | Array ของเอกสาร | EDocument object | **EDocument object** | Parameter | Description | Schema | | --------------------------- | -------------------------- | -------- | | SellerId (*required*) | seller id ของ Seller | string | | DocumentRefId (*required*) | document id ของ Rakmao | Guid | | DocumentName (*required*) | ชื่อเอกสาร | string | | DocumentUrl (*required*) | Url เอกสาร | string | | IsRevised (*required*) | เป็นการ revise หรือไม่ | boolean | **EDocument Type** | Key | Value | | --------------------------- | -------------------------- | | MOU | 1 | | MKT Agreement | 2 | | Invoice | 3 | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "Type": 1, "EDocuments": [{ "SellerRefId": "1-100", "DocumentRefId": "491482c2-6d89-4511-9cd3-aed095853663", "DocumentName": "mou_file_100.pdf", "DocumentUrl": "path/to/file", "IsRevised": false },{ "SellerRefId": "1-101", "DocumentRefId": "491482c2-6d89-4511-9cd3-aed095853663", "DocumentName": "mou_file_101.pdf", "DocumentUrl": "path/to/file", "IsRevised": false } ], } ``` #### Example Response ```json { "Status": 200, "Message": "Success", "Data": true } ``` ## Seller Center To Rakmao ### `POST /api/v1/ExternalInterface/SellerCenter/SendVendorDetail ` > API นี้จะรับรายละเอียดของ Vendor ที่ถูกจับคู่และยอมรับเงื่อนไขของการประกวดราคาหรือสนใจการประกวดราคา **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | RFQRefId (*required*) | Id RFQ ของทาง Rakmao ที vendor สนใจทีจะประกวดราคา | Guid | | VendorName (required) | ชื่อของ vendor | String | | VendorId (*required*) | Id vendor ของทาง Seller Center | String | | ContactName | ชื่อของผู้ติดต่อ | String | | ContactPhone | เบอร์ของผู้ติดต่อ | String | | ContactEmail | อีเมลของผู้ติดต่อ | String | | Address (*required*) | ที่อยู่ของ vendor | String | | TaxId | เลขประจำตัวผู้เสียภาษี | String | | IdCardNumber | เลขประจำตัวผู้เสียภาษี | String | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | VendorRefId | Id vendor ของทาง Rakmao | Guid | #### Example Request ```json { "RFQRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "VendorName": "Vendor007", "VendorId": "491482c2-6d89-4511-9cd3-aed095853663", "ContactName" : "Madeee", "ContactPhone": "0811111180", "ContactEmail": "madeee@vendor007.org", "TaxId" : "3422121212121", "IdCardNumber" : "3434342121", "Address":"เลขที่ 47 ม.4 เขตคันนายาว แขวงคันนายาว กรุงเทพมหานคร 10230 " } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": { "VendorRefId":"491482c2-6d89-4511-9cd3-aed095853663" } } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/UploadQuotationDetail` > API นี้จะรับรายละเอียดของ Quotation ที่ vendor ประกวดราคามา **Body Request** | Parameter | Description | Schema | | ---------------------------------------------------- | ---------------------------------- | -------- | | RFQRefId (*required*) | Id RFQ ของทาง Rakmao | Guid | | VendorRefId (*required*) | Id vendor ของทาง Rakmao | String | | QuotationId (*required*) | Id quotations ของทาง Seller Center | String | | [PaymentMethodType](#PaymentMethodEnum) (*required*) | รูปแบบการรับชำระ | Number | | PaymentMethodDetail | Credit days | Number | | DueDate (*required*) | วันที่สิ้นสุดของราคาที่เสนอ | DateTime | | TotalOfferItem (*required*) | จำนวนสินค้าที่ต้องการประกวดราคา | Number | | SubTotal (*required*) | ราคารวมของสินค้า | Number | | Discount (*required*) | ยอดส่วนลด | Number | | ==[DiscountType](#DiscountTypeEnum) (*required*)== | ประเภทของการคำนวณส่วนลด | Integer | | ==DiscountRate (*required*)== | อัตราการคำนวณส่วนลด | Number | | BeforeTax (*required*) | ราคาก่อนคำนวณภาษี | Number | | [TaxType](#TaxTypeEnum) (*required*) | ชนิดการคำนวณภาษี | Integer | | TaxRate (*required*) | อัตราการคำนวณภาษี | Number | | TaxValue (*required*) | อัตราภาษี | Number | | [ShippingType](#ShippingTypeEnum) (*required*) | ชนิดการจัดส่ง | Number | | ShippingTaxRate (*required*) | อัตราการคำนวณภาษีจัดส่ง | Number | | ShippingVatType (*required*) | ชนิดการคำนวณภาษี | Number | | GrandTotalShippingPrice (*required*) | ราคาค่าขนส่งรวมภาษี | Number | | ShippingPrice (*required*) | ราคาค่าขนส่ง | Number | | GrandTotal (*required*) | ราคารวมสุทธิ | Number | | GrandTotalWithShipping (*required*) | ราคาสุทธิรวมค่าขนส่ง | Number | | QuotationRemark | หมายเหตุของใบเสนอราคา | String | | QuotationItem (*required*) | รายการสินค้าที่ประกวดราคา | Object | | AttachedFileList | รายการไฟล์แนบ Seller | Array of object | **QuotationItem Object** | Parameter | Description | Schema | | ---------------------- | ----------- | ------ | | ItemRefId (*required*) | | String | | Quantity (*required*) | | Number | | Price (*required*) | | Number | | Note | | String | **AttachedFileList Object** | Parameter | Description | Schema | | ---------------------- | ----------- | ------ | | AttachedFileName (*required*) | | String | | AttachedFileLink (*required*) | | String | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | QuotationRefId | Id quotation ของทาง Rakmao | Guid | #### Example Request ```json { "RFQRefId": "491482c2-6d89-4511-9cd3-aed095853663", "VendorRefId": "491482c2-6d89-4511-9cd3-aed095853663", "TotalOfferItem": 12, "TaxType": 0, "TaxRate" : 0, "TaxValue" : 0, "BeforeTax": 2500, "SubTotal": 2500, "ShippingPrice": 50, "Discount": 0, "DiscountType": 1, "DiscountRate": 0, "GrandTotal": 2550, "DueDate": "2022-04-16T00:00:00.000000Z", "GrandTotalWithShipping": 3450, "QuotationId": "1", "PaymentMethodType": 2, "PaymentMethodDetail": 7, "QuotationRemark": "-", "ShippingType": 2, "ShippingTaxRate" : 0, "ShippingVatType": 2, "GrandTotalShippingPrice" : 50, "Shipping": 900, "QuotationItem": [ { "ItemRefId":"491482c2-6d89-4511-9cd3-aed095853663", "Quantity":99, "Price": 2000, "Note": "test1" }, { "ItemRefId":"491482c2-6d89-4511-9cd3-aed095853663", "Quantity":1, "Price": 500, "Note": "test2" } ], "AttachedFileList": [ { "AttachedFileName" : "test.png", "AttachedFileLink" : "url/to/file" }, { "AttachedFileName" : "test.png", "AttachedFileLink" : "url/to/file" } ] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": { "QuotationRefId":"491482c2-6d89-4511-9cd3-aed095853663" } } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/UpdateQuotationItem` > API นี้จะรับการตอบกับการร้องข้อ Revise item สำหรับอัพเดทราคาที่ทาง vendor ได้ทำการแก้ไข **Body Request** | Parameter | Description | Schema | | --------------------------------------- | --------------------------- | -------- | | QuotationsRefId (*required*) | Id Quotations ของทาง Rakmao | Guid | | UpdateDateTime (*required*) | เวลาที่ทำการอัพเดท | DateTime | | SubTotal (*required*) | ราคารวมของสินค้า | Number | | Discount (*required*) | ยอดส่วนลด | Number | | ==[DiscountType](#DiscountTypeEnum) (*required*)== | ประเภทของการคำนวณส่วนลด | Integer | | ==DiscountRate (*required*)== | อัตราการคำนวณส่วนลด | Number | | BeforeTax (*required*) | ราคาก่อนคำนวณภาษี | Number | | [TaxType](#TaxTypeEnum) (*required*) | ชนิดการคำนวณภาษี | Integer | | TaxRatePercentage (*required*) | อัตราการคำนวณภาษี | Number | | Vat (*required*) | อัตราภาษี | Number | | [ShippingType](#ShippingTypeEnum) (*required*) | ชนิดการจัดส่ง | Number | | ShippingTaxRate (*required*) | อัตราการคำนวณภาษีจัดส่ง | Number | | ShippingVatType (*required*) | ชนิดการคำนวณภาษี | Number | | GrandTotalShippingPrice (*required*) | ราคาค่าขนส่งรวมภาษี | Number | | GrandTotal (*required*) | ราคารวมสุทธิ | Number | | GrandTotalWithShipping (*required*) | ราคาสุทธิรวมค่าขนส่ง | Number | | QuotationItem (*required*) | รายการสินค้าที่อัพเดทราคา | Object | | [PaymentMethodType](#PaymentMethodEnum) (*required*) | รูปแบบการรับชำระ | Number | | PaymentMethodDetail | Credit days | Number | | DueDate (*required*) | วันที่สิ้นสุดของราคาที่เสนอ | DateTime | | ShippingPrice (*required*) | ราคาค่าขนส่ง | Number | | QuotationRemark | หมายเหตุของใบเสนอราคา | String | | AttachedFileList | รายการไฟล์แนบ Seller | Array of object | **QuotationItem Object** | Parameter | Description | Schema | | ---------------------- | ----------- | ------ | | ItemRefId (*required*) | | String | | Price (*required*) | | Number | | Note | | String | **AttachedFileList Object** | Parameter | Description | Schema | | ---------------------- | ----------- | ------ | | AttachedFileName (*required*) | | String | | AttachedFileLink (*required*) | | String | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "QuotationRefId": "144982c2-9cd3-4511-6d89-aed095853663", "UpdateDateTime": "2022-02-14T08:35:45.2918396Z", "DueDate": "2022-04-16T00:00:00.000000Z", "PaymentMethodType": 2, "PaymentMethodDetail": 7, "SubTotal": 3200, "Discount": 0, "DiscountType": 1, "DiscountRate": 0, "BeforeTax": 3200, "TaxType": 0, "TaxRatePercentage" : 0, "Vat" : 0, "ShippingType": 1, "ShippingTaxRate" : 0, "ShippingVatType": 2, "ShippingPrice": 50, "GrandTotalShippingPrice" : 1200, "GrandTotal": 3200, "GrandTotalWithShipping": 4400, "QuotationRemark": "-", "QuotationItem": [ { "ItemRefId":"9cd36d89-82c2-3663-4914-45119585aed0", "Price": 1980, "Note":"" }, { "ItemRefId":"491482c2-6d89-4511-9cd3-aed095853663", "Price": 1220, "Note":"" } ], "AttachedFileList": [ { "AttachedFileName" : "test.png", "AttachedFileLink" : "url/to/file" }, { "AttachedFileName" : "test.png", "AttachedFileLink" : "url/to/file" } ] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/SendQuotationReject` > API นี้จะรับการตอบกับการยุติกการมีส่วนร่วมในการเสนอราคา **Body Request** | Parameter | Description | Schema | | --------------------------- | -------------------------- | -------- | | QuotationRefId (*required*) | Id Quotation ของทาง Rakmao | Guid | | RejectReasons (*required*) | เวลาที่ทำการอัพเดท | String | | RejectDateTime (*required*) | รายการสินค้าที่อัพเดทราคา | DateTime | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "QuotationRefId": "491482c2-6d89-4511-9cd3-aed095853663", "RejectDateTime": "2021-05-19T06:11:16.3929186Z", "RejectReasons": "" } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/RequestInquiry` > สำหรับร้องของข้อมูลเพิ่มเติมจากผู้ซื้อ **Body Request** | Parameter | Description | Schema | | ------------------------ | --------------------------------------------------------------------------------------------------------------- | ------------ | | RFQRefId (*required*) | Id RFQ ของ Rakmao | GuId | | QuotationId (*required*) | Id Quotation หรือ Draft quotation ของทาง Seller (ไว้ใช้ในการ refernce ว่า inquiry อยู่ หรือ เกินลิมิต inquiry ) | string | | VendorName (*required*) | ชื่อร้านค้าที่ร้องขอ Inquiry ของทาง Seller | string | | Round (*required*) |รอบในการส่ง | String | | Inquiries (*required*) | รายการชนิดข้อมูลที่ต้องการขอรายละเอียดเพิ่มเติม | Array of object | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "RFQRefId": "491482c2-6d89-4511-9cd3-aed095853663", "QuotationId": "1-1 ", "VendorName":"sname1", "Round":"1", "Inquiries": [ { "inquiryType": "1", "note": "ทดสอบ หมายเหตุของ Inquiry type ที่ 1" }, { "inquiryType": "2", "note": "ทดสอบ หมายเหตุของ Inquiry type ที่ 2" }, { "inquiryType": "3", "note": "ทดสอบ หมายเหตุของ Inquiry type ที่ 3" } ] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/UpdateQuotationOnce` > API นี้จะรับการอัพเดทใบเสนอราคา 1 **Body Request** | Parameter | Description | Schema | | ---------------------------------------------- | --------------------------- | -------- | | QuotationsRefId (*required*) | Id Quotations ของทาง Rakmao | Guid | | UpdateDateTime (*required*) | เวลาที่ทำการอัพเดท | DateTime | | SubTotal (*required*) | ราคารวมของสินค้า | Number | | Discount (*required*) | ยอดส่วนลด | Number | | ==[DiscountType](#DiscountTypeEnum) (*required*)== | ประเภทของการคำนวณส่วนลด | Integer | | ==DiscountRate (*required*)== | อัตราการคำนวณส่วนลด | Number | | BeforeTax (*required*) | ราคาก่อนคำนวณภาษี | Number | | [TaxType](#TaxTypeEnum) (*required*) | ชนิดการคำนวณภาษี | Integer | | TaxRatePercentage (*required*) | อัตราการคำนวณภาษี | Number | | Vat (*required*) | อัตราภาษี | Number | | [ShippingType](#ShippingTypeEnum) (*required*) | ชนิดการจัดส่ง | Number | | ShippingTaxRate (*required*) | อัตราการคำนวณภาษีจัดส่ง | Number | | ShippingVatType (*required*) | ชนิดการคำนวณภาษี | Number | | GrandTotalShippingPrice (*required*) | ราคาค่าขนส่งรวมภาษี | Number | | GrandTotal (*required*) | ราคารวมสุทธิ | Number | | GrandTotalWithShipping (*required*) | ราคาสุทธิรวมค่าขนส่ง | Number | | QuotationItem (*required*) | รายการสินค้าที่อัพเดทราคา | Object | | [PaymentMethodType](#PaymentMethodEnum) (*required*) | รูปแบบการรับชำระ | Number | | PaymentMethodDetail | Credit days | Number | | DueDate (*required*) | วันที่สิ้นสุดของราคาที่เสนอ | DateTime | | ShippingPrice (*required*) | ราคาค่าขนส่ง | Number | | QuotationRemark | หมายเหตุของใบเสนอราคา | String | **QuotationItem Object** | Parameter | Description | Schema | | ---------------------- | ----------- | ------ | | ItemRefId (*required*) | | String | | Price (*required*) | | Number | | Note | | String | **AttachedFileList Object** | Parameter | Description | Schema | | ---------------------- | ----------- | ------ | | AttachedFileName (*required*) | | String | | AttachedFileLink (*required*) | | String | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "QuotationRefId": "144982c2-9cd3-4511-6d89-aed095853663", "UpdateDateTime": "2022-02-14T08:35:45.2918396Z", "DueDate": "2022-04-16T00:00:00.000000Z", "PaymentMethodType": 2, "PaymentMethodDetail": 7, "SubTotal": 3200, "Discount": 0, "DiscountType": 1, "DiscountRate": 0, "BeforeTax": 3200, "TaxType": 0, "TaxRatePercentage" : 0, "Vat" : 0, "ShippingType": 1, "ShippingTaxRate" : 0, "ShippingVatType": 2, "ShippingPrice": 50, "GrandTotalShippingPrice" : 1200, "GrandTotal": 3200, "GrandTotalWithShipping": 4400, "QuotationRemark": "-", "QuotationItem": [ { "ItemRefId":"9cd36d89-82c2-3663-4914-45119585aed0", "Price": 1980, "Note":"" }, { "ItemRefId":"491482c2-6d89-4511-9cd3-aed095853663", "Price": 1220, "Note":"" } ], "AttachedFileList": [ { "AttachedFileName" : "test.png", "AttachedFileLink" : "url/to/file" }, { "AttachedFileName" : "test.png", "AttachedFileLink" : "url/to/file" } ] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/SendVendorBidding` > API นี้จะรับรายละเอียดของ Vendor ที่ไม่ต้องการเสนอราคา **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | RFQRefId (*required*) | Id RFQ ของทาง Rakmao | Guid | | VendorName (required) | ชื่อของ vendor | String | | VendorId (*required*) | Id vendor ของทาง Seller Center | String | | ContactName | ชื่อของผู้ติดต่อ | String | | ContactPhone | เบอร์ของผู้ติดต่อ | String | | ContactEmail | อีเมลของผู้ติดต่อ | String | | Address (*required*) | ที่อยู่ของ vendor | String | | TaxId | เลขประจำตัวผู้เสียภาษี | String | | IdCardNumber | เลขประจำตัวผู้เสียภาษี | String | | Status (*required*) | สถานะ ไม่ต้องการเสนอราคา, กลับมาเสนอราคา | Integer | | Reason | เหตุผลที่ไม่ต้องการเสนอราคา | String | | Note | หมายเหตุ | String | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "RFQRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "VendorName": "Vendor007", "VendorId": "1-20", "ContactName" : "Madeee", "ContactPhone": "0811111180", "ContactEmail": "madeee@vendor007.org", "TaxId" : "3422121212121", "IdCardNumber" : "3434342121", "Address":"เลขที่ 47 ม.4 เขตคันนายาว แขวงคันนายาว กรุงเทพมหานคร 10230 ", "Status" : "1", "Reason" : "ได้รับราคาจากซัพพลายเออร์ช้า", "Note":"ทดสอบ" } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/SendViewerSeller` > API นี้จะส่งรายละเอียดของ Vendor ที่กดเข้ามาดูใบ RFQ **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | RFQRefId (*required*) | Id RFQ ของทาง Rakmao | Guid | | VendorName (required) | ชื่อของ vendor | String | | VendorId (*required*) | Id vendor ของทาง Seller Center | String | | ContactName | ชื่อของผู้ติดต่อ | String | | ContactPhone | เบอร์ของผู้ติดต่อ | String | | ContactEmail | อีเมลของผู้ติดต่อ | String | | Address (*required*) | ที่อยู่ของ vendor | String | | TaxId | เลขประจำตัวผู้เสียภาษี | String | | IdCardNumber | เลขประจำตัวผู้เสียภาษี | String | | ViewDateTime (*required*) | เวลาที่กดเข้ามาดูใบ RFQ | DateTime | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "RFQRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "VendorName": "Vendor007", "VendorId": "1-20", "ContactName" : "Madeee", "ContactPhone": "0811111180", "ContactEmail": "madeee@vendor007.org", "TaxId" : "3422121212121", "IdCardNumber" : "3434342121", "Address":"เลขที่ 47 ม.4 เขตคันนายาว แขวงคันนายาว กรุงเทพมหานคร 10230 ", "ViewDateTime": "2022-10-10 17:01:32" } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/SendAdjustBeforePoResponse` > API นี้จะส่งข้อมูลตอบกลับเรื่อง adjust before PO **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | QuotationId (*required*) | Id Quotation ของทาง Rakmao | Guid | | [ResponseStatus](#ResponseStatusEnum#) (*required*) | สถานะของการตอบกลับ | int | | Note | หมายเหตุ | string | | ItemList | รายการสินค้า | Array of object | **ItemList Object** | Parameter | Description | Schema | | --------------------------- | ----------- | ------ | | ItemRefId (*required*) | Adjust item id (ได้จากตอนที่ rakmao ส่งไป)| Guid | | ItemNote | | string | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "QuotationId": "4b5b537a-a101-4100-a516-232580b64860", "Note": "เพิ่มสินค้า", "ResponseStatus": 1, "ItemList": [ { "ItemRefId": "7a73946f-4b91-4a2b-9e0d-8b430df7deee", "ItemNote": "แก้" } ] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/UpdateEDocumentStatus` > API นี้จะส่งสถานะของ EDocument กลับมา **Body Request** | Parameter | Description | Schema | | --------------------------- | -------------------------- | -------- | | SellerRefId (*required*) | seller id ของ Seller | int | | DocumentId (*required*) | document id ของ Rakmao | Guid | | Status (*required*) | สถานะเอกสาร (ณ ตอนนี้ส่งแค่ 1(complete)) | int | **Body Response** | Parameter | Description | Schema | | ------------------------------- | ----------------------------------- | ------ | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "SellerRefId": "1-100", "DocumentId": "7a73946f-4b91-4a2b-9e0d-8b430df7deee", "Status": 1 } ``` #### Example Response ```json { "Status": 200, "Message": "Success", "Data": true } ``` ## Seller Center To Rakmao (Payment) ### `POST /api/v1/ExternalInterface/SellerCenter/UpdateDeliveryDate` **Body Request** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | DeliveryDate (*required*) | วันที่จัดส่งจริง | string | | DeliveryTime (*required*) | เวลาที่จัดส่งจริง | string | | DeliveryEstimateTime | จำนวนชั่วโมงที่คาดว่าผู้ซื้อจะได้รับสินค้า (default 1 = DeliveryTime + 1) | number | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "DeliveryDate": "2023-01-01", "DeliveryTime": "08:00:00", "DeliveryEstimateTime": 4 } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/ConfirmDelivery` **Body Request** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | ConfirmTimestamp (*required*) | วันที่ยืนยันการจัดส่ง | Date | | Note | หมายเหตุการจัดส่ง/ ข้อมูลเพิ่มเติม | string | | AttachedFileList | รายการไฟล์แนบ | Array of object | | AttachedInvoiceFileList | รายการไฟล์แนบ Invoice | Array of object | **AttachedFileList Object && AttachedInvoiceFileList Object** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | AttachedFileName (*required*) | | string | | AttachedFileLink (*required*) | | string | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "ConfirmTimestamp": "2023-02-22T00:00:00.000000Z", "Note": "การจัดส่งเร็วกว่ากำหนด", "AttachedFileList": [ { "AttachedFileName" : "devivery-site-image-1.jpg", "AttachedFileLink" : "https://example.domin/path/to/file" }, { "AttachedFileName" : "devivery-site-image-2.jpg", "AttachedFileLink" : "https://example.domin/path/to/file" } ], "AttachedInvoiceFileList": [ { "AttachedFileName" : "devivery-site-image-1.jpg", "AttachedFileLink" : "https://example.domin/path/to/file" }, { "AttachedFileName" : "devivery-site-image-2.jpg", "AttachedFileLink" : "https://example.domin/path/to/file" } ] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/RefundReview` > api **Body Request** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | RefundReviewBy (*required*) | ชื่อผู้ทำการตรวจสอบคำร้อง | string | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "RefundReviewBy" : "นายทดสอบ ระบบ" } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/RefundConfirm` > api **Body Request** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | RefundStatus (*required*) | สถานะของคำร้อง (1 = Accept , 2 = Reject) | [number](#MasterData-RefundConfirm) | | RefundReasons | รายละเอียดของการยืนยันคำร้อง | string | | RefundNote | รายละเอียดเพิ่มเติมของการยืนยันคำร้อง | string | | RefundConfirmBy (*required*) | ชื่อผู้ทำการยอมรับคำร้อง | string | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "RefundStatus" : 1, "RefundReasons" : null, "RefundNote" : null, "RefundConfirmBy" : "นายทดสอบ ระบบ", } ``` #### Example Request 2 ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "RefundStatus" : 2, "RefundReasons" : "การขนส่ง", "RefundNote" : "ไม่สามารถยกเลิกได้", "RefundConfirmBy" : "นายทดสอบ ระบบ", } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/NewSeller` > รับข้อมูลผู้ขายที่ทำการลงทะเบียนเสร็จสิ้นในระบบของ seller **Body Request** | Parameter | Description | Schema | | ------------------------------- | ---------------------------------------------- | ------ | | SellerId (_required_) | Id ของทาง Seller | string | | SellerName (_required_) | ชื่อร้านค้า | string | | SellerEmail (_required_) | อีเมลร้านค้า | string | | SellerPhone (_required_) | เบอร์ติดต่อร้านค้า | string | | SellerTaxId (_required_) | เลขประจำตัวเสียภาษีร้านค้า | string | | SellerIdCard (_required_) | เลขประจำตัวประชนร้านค้า / ผู้เกียวข้อง | string | | SellerType (_required_) | ชนิดร้านค้า | number | | SellerCategory (_required_) | ประเภทของร้านค้า | [number](#SellerCategoryEnum) | | BankName (_required_) | ชื้อธนาคารเจ้าของบัญชี | string | | BankAccountName (_required_) | ชื่อบัญชี | string | | BankAccountNumber (_required_) | เลชบัญชี | string | | SellerAddress (_required_) | บ้านเลขที่ ที่ตั้งร้านค้า | string | | SellerSubDistrict (_required_) | ตำบล/แขวง ที่ตั้งร้านค้า | string | | SellerDistrict (_required_) | อำเภอ/เขต ที่ตั้งร้านค้า | string | | SellerProvince (_required_) | จังหวัด ที่ตั้งร้านค้า | string | | SellerZipcode (_required_) | รหัสไปรษณีย์ ร้านค้า | string | | ContactFirstName (_required_) | ชื่อของผู้ดูแลหรือผู้ติดต่อของร้านค้า | string | | ContactLastName (_required_) | นามสกุลของผู้ดูแลหรือผู้ติดต่อของร้านค้า | string | | ContactEmail (_required_) | อีเมลของผู้ดูแลหรือผู้ติดต่อของร้านค้า | string | | ContactPhone (_required_) | เบอร์โทรศัพท์ของผู้ดูแลหรือผู้ติดต่อของร้านค้า | string | | ContactAddress (_required_) | บ้านเลขที่ ของผู้ดูแลหรือผู้ติดต่อของร้านค้า | string | | ContactSubDistrict (_required_) | ตำบล/แขวง ของผู้ดูแลหรือผู้ติดต่อของร้านค้า | string | | ContactDistrict (_required_) | อำเภอ/เขต ของผู้ดูแลหรือผู้ติดต่อของร้านค้า | string | | ContactProvince (_required_) | จังหวัด ของผู้ดูแลหรือผู้ติดต่อของร้านค้า | string | | ContactZipcode (_required_) | รหัสไปรษณีย์ ของผู้ดูแลหรือผู้ติดต่อของร้านค้า | string | | PayMethod (_required_) | รูปแบบการรับเงินของร้านค้า | [array](#PayMethodReceiving) | | ServiceAreas (_required_) | Service area ทั้งหมดของ seller รายนี้ | Array of string | | BankAccountFile | ไฟล์หน้าสมุดบัญชี (support only JPG ,JPEG ,PNG ,BMP ,TIFF ,PDF ,DOC ,DOCX ,XLS ,XLSX ,OCTET and max 3 MB) | AttachedFile Object | | IdentityCardFile | ไฟล์บัตรประจำตัวประชาชน (support only PNG, JPEG, JPG and max 3 MB) | AttachedFile Object | **AttachedFile Object** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | AttachedFileName (*required*) | | string | | AttachedFileLink (*required*) | | string | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | Id ของ Master Data | Guid | #### Example Request ```json { "SellerId": "0-9999", "SellerName": "บริษัท ความอดทนมี จำกัด", "SellerEmail": "support@endurelimited.com", "SellerPhone": "+6629629669", "SellerTaxId": "0199299329000", "SellerIdCard": "1123454545678", "SellerType": 1, "SellerCategory": 1, "BankName": "ธนาคารกสิกรไทย", "BankAccountName": "บริษัท ความอดทนมี จำกัด", "BankAccountNumber": "0129999990", "SellerAddress": "44/112", "SellerSubDistrict": "หอรัตนไชย", "SellerDistrict": "พระนครศรีอยุธยา", "SellerProvince": "พระนครศรีอยุธยา", "SellerZipcode": "13000", "ContactFirstName": "มาดี", "ContactLastName": "มีขันติ", "ContactEmail": "madee_meekhanti@endurelimited.com", "ContactPhone": "0690690690", "ContactAddress": "44/112", "ContactSubDistrict": "หอรัตนไชย", "ContactDistrict": "พระนครศรีอยุธยา", "ContactProvince": "พระนครศรีอยุธยา", "ContactZipcode": "13000", "PayMethod": [1, 2, 3], "ServiceAreas": ["เชียงใหม่", "พระนครศรีอยุธยา"] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": "491482c2-6d89-4511-9cd3-aed095853663" } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/UpdateSellerData` > แก้ไขข้อมูลของผู้ขาย seller **Body Request** | Parameter | Description | Schema | | ------------------------------- | ---------------------------------------------- | ------ | | SellerId (_required_) | Id ของทาง Seller | string| | SellerName (_required_) | ชื่อร้านค้า | string | | SellerTaxId (_required_) | เลขประจำตัวเสียภาษีร้านค้า | string | | SellerIdCard (_required_) | เลขประจำตัวประชนร้านค้า / ผู้เกียวข้อง | string | | SellerEmail (_required_) | อีเมลร้านค้า | string | | SellerPhone (_required_) | เบอร์ติดต่อร้านค้า | string | | SellerAddress (_required_) | บ้านเลขที่ ที่ตั้งร้านค้า | string | | SellerSubDistrict (_required_) | ตำบล/แขวง ที่ตั้งร้านค้า | string | | SellerDistrict (_required_) | อำเภอ/เขต ที่ตั้งร้านค้า | string | | SellerProvince (_required_) | จังหวัด ที่ตั้งร้านค้า | string | | SellerZipcode (_required_) | รหัสไปรษณีย์ ร้านค้า | string | | SellerStatus | สถานะร้านค้า | string | | BankName (_required_) | ชื่อธนาคารเจ้าของบัญชี | string | | BankAccountName (_required_) | ชื่อบัญชี | string | | BankAccountNumber (_required_) | เลขบัญชี | string | | ServiceAreas (_required_) | Service area ทั้งหมดของ seller รายนี้ | Array of string | | PaysoonId | ถ้า seller รายนี้เคยสมัคร paysoon แล้วให้ส่ง Id ของทาง paysoon | string | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "SellerId": "1-1", "SellerName": "ร้านค้าวัสดุก่อสร้าง 03", "SellerTaxId": "0199299329000", "SellerIdCard": "1123454545678", "SellerEmail": "support@endurelimited.com", "SellerPhone": "0629629669", "SellerAddress": "44/112", "SellerSubDistrict": "หอรัตนไชย", "SellerDistrict": "พระนครศรีอยุธยา", "SellerProvince": "พระนครศรีอยุธยา", "SellerZipcode": "13000", "SellerStatus": "อนุมัติแล้ว", // ระงับการใช้ "BankName": "ธนาคารกสิกรไทย", "BankAccountName": "บริษัท ความอดทนมี จำกัด", "BankAccountNumber": "0129999990", "ServiceAreas": ["เชียงใหม่", "พระนครศรีอยุธยา"], "PaysoonId": "123", } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/UpdatePayMethod` > แก้ไขรูปแบบการรับเงินผู้ขาย seller **Body Request** | Parameter | Description | Schema | | ------------------------------- | ---------------------------------------------- | ------ | | SellerId (_required_) | Id ของทาง Seller | string | | SellerTaxId (_required_) | เลขประจำตัวเสียภาษีร้านค้า | string | | PayMethod (_required_) | รูปแบบการรับเงินผู้ขาย | [array](#PayMethodReceiving) | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "SellerId": "0-9999", "SellerTaxId": "0199299329000", "PayMethod": [2, 3] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ## Rakmao To Seller Center (Payment) ### `POST /public/new/sellerCenter/PaymentSuccess/api` > API **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | GrandTotal (*required*) | ยอดเงินที่ลูกค้าชำระ | number | | PayTimestamp (*required*) | เวลาที่ลูกค้าชำระ | date | | PayMethod (*required*) | ช่องทางที่ลูกค้าชำระ | [number](#MasterDataPayMethod) | | Subtotal (*required*) | ยอดรวมก่อนส่วนลดใดๆ | number | | PlatformDiscount (*required*) | ส่วนลดแพลตฟอร์ม | number | | SellerDiscount (*required*) | ส่วนลดร้านค้า | number | | DeliveryDiscount (*required*) | ส่วนลดค่าขนส่ง | number | | PaymentFee (*required*) | ค่าธรรมเนียมบัตรเครดิต | number | | SellerReceiveAmount (*required*) | ยอดที่ผู้ขายจะได้รับ(ยอด PO + seller code) | number | | OrderSummaryReportUrl | Url สำหรับใบประกบ | string | | BuyerOrgRefId (*required*) | Id Org ของทาง Rakmao | Guid | | PayslipUrl | Url payslip สำหรับการจ่ายเงินแบบชำระตรงกับร้านค้า | string | #### Example Request ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "GrandTotal": 12400, "PayTimestamp":"2023-01-11T00:00:00.000000Z", "PayMethod":2, "Subtotal": 12600, "PlatformDiscount": 300, "DeliveryDiscount": 100, "PaymentFee": 100, "SellerReceiveAmount": 12600, "OrderSummaryReportUrl": "url/to/file", "BuyerOrgRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "PayslipUrl": "url/to/file" } ``` ### `POST /public/new/sellerCenter/OrderComplete/api` > API **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | #### Example Request ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663" } ``` ### `POST /public/new/sellerCenter/PayoutSuccess/api` > จะส่งค่าเมื่อระบบทำการ โอนเงินให้ seller เสร็จสิ้น **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | Amount (*required*) | ยอดเงินที่ทำการโอนเงินให้สำหรับเอกสารนี้ (ยอดGrandTotal PO)| number | #### Example Request ```json { "items" : [ { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "Amount": 12400, }, { "PoRefId" : "aed09585-6d89-4511-9cd3-491482c23663", "Amount": 32500, } ] } ``` ### `POST /public/new/sellerCenter/CreateOrderBuynow/api` > ส่งข้อมูลของ Order จาก Rakmao Buynow หลังจาก buyer ชำระเงินสำเร็จ **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | SellerId (*required*) | Id seller ของทาง Seller | string | | BuyerName (*required*) | ชื่อนามสกุลของผู้ซื้อ | string | | Products (*required*) | รายละเอียดของสินค้า | Array of ProductDetail Object | | DeliveryTotal (*required*) | ยอดจัดส่งของคำสั่งซื้อนี้ | number | | GrandTotal (*required*) | ยอดรวมสินค้าและค่าจัดส่ง | number | | DeliveryMethod (*required*) | รูปแบบการจัดส่ง | [number](#DeliveryMethodType) | | PickupDate | วันที่ไปรับของสำหรับการจัดส่งแบบ Click&Collect | string | | DeliveryDetail | ที่อยู่สำหรับจัดส่ง | Object | | OrderCode (*required*) | Order code ของทาง Rakmao | string | | BuyerEmail | อีเมล์ของผู้ซื้อ | string | | BuyerPhoneNo | เบอร์โทรศัพท์ของผู้ซื้อ | string | | BuyerOrgRefId (*required*) | Organization id ของทาง Rakmao | Guid | | OrderCreateType (*required*) | รูปแบบการสร้างคำสั่งซื้อ | [number](#BuynowOrderCreateType) | | DeliveryContactName | ชื่อผู้รับสินค้า | String | | QuotationType | ประเภทใบเสนอราคา(ในกรณีที่คำสั่งซื้อนี้มาจากใบเสนอราคา) | [number](#BuynowQuotationType) | | BuyerType (*required*) | ประเภทของผู้ซื้อ | [number](#BuyerType) | **ProductDetail Object** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | ProductRefId (*required*) | Id Product ของทาง Rakmao | Guid | | ProductName (*required*) | ชื่อสินค้า | string | | ProductUnit (*required*) | หน่วยสินค้า | string | | Quantity (*required*) | จำนวนสินค้าที่สั่งซื้อ | number | | Total (*required*) | ราคาสินค้าทั้งหมด | number | **DeliveryDetail Object** | Parameter | Description | Schema | | ------------------------- | ----------- | ------ | | Address | | String | | SubDistrict | | String | | District | | String | | Province | | String | | PostCode | | String | | LocationUrl | url สถานที่จัดส่ง | String | #### Example Request ```json { "PoRefId": "491482c2-6d89-4511-9cd3-aed095853663", "SellerId": "1-1", "BuyerName": "Rakmao Buynow", "Products": [ { "ProductRefId": "c6f5d09c-7e2c-46aa-a80a-ff8c706069ad", "ProductNumber": "Oriharukon", "ProductUnit": "ea", "Quantity": 10, "Total": 1000.00 } ], "DeliveryTotal": 100.00, "GrandTotal": 1100.00, "DeliveryMethod": 2, "PickupDate": "2024-03-28", "DeliveryDetail": null, "OrderCode": "RM20240710B0001", "BuyerEmail": "test@rakmao.com", "BuyerPhoneNo": "0899999999", "BuyerOrgRefId": "2af9e052-1099-47cb-ba3c-466c831c9c03", "OrderCreateType": 1, "DeliveryContactName": "ทดสอบ การจัดส่ง", "QuotationType": 1, "BuyerType": 1, } ``` ```json { "PoRefId": "491482c2-6d89-4511-9cd3-aed095853663", "SellerId": "1-1", "BuyerName": "Rakmao Buynow", "Products": [ { "ProductRefId": "c6f5d09c-7e2c-46aa-a80a-ff8c706069ad", "ProductNumber": "Oriharukon", "ProductUnit": "ea", "Quantity": 10, "Total": 1000.00 } ], "DeliveryTotal": 100.00, "GrandTotal": 1100.00, "DeliveryMethod": 1, "PickupDate": null, "DeliveryDetail": { "Address": "No. 1624/2 New Phetburi Road", "SubDistrict": "Makkasan", "District": "Ratchathewi", "Province": "กรุงเทพ", "PostCode": "10400", "LocationUrl": "https://maps.app.goo.gl/P23Zd85esKPwcp159" }, "OrderCode": "RM20240710B0001", "BuyerEmail": "test@rakmao.com", "BuyerPhoneNo": "0899999999", "BuyerOrgRefId": "2af9e052-1099-47cb-ba3c-466c831c9c03", "OrderCreateType": 2, "DeliveryContactName": "ทดสอบ การจัดส่ง", "QuotationType": 1, "BuyerType": 2, } ``` ### `POST /public/new/sellerCenter/CancelOrderBuynow/api` > แจ้งยกเลิกคำสั่งซื้อ **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | Status (*required*) | สถานะการยกเลิก | [number](#BuynowOrderCancelEnum) | | Reason (*required*) | เหตุผลที่ยกเลิกคำสั่งซื้อ | string | | ActionByType (*required*) | Buyer or Admin | string | #### Example Request ```json { "PoRefId": "491482c2-6d89-4511-9cd3-aed095853663", "Status": 1, "Reason": "ไม่ได้รับสินค้า", "ActionByType": "Admin" } ``` ### `POST /public/new/sellerCenter/RejectDeliveryDocument/api` > ปฏิเสธเอกสารการจัดส่ง โดยย้อนสถานะคำสั่งซื้อจาก WaitingVerify ไปเป็น ToReceive **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | Reason (*required*) | เหตุผลที่ปฏิเสธเอกสารการจัดส่ง | string | | ActionByType (*required*) | Buyer or Admin | string | #### Example Request ```json { "PoRefId": "491482c2-6d89-4511-9cd3-aed095853663", "Reason": "ไม่ได้รับสินค้า", "ActionByType": "Admin" } ``` ### `POST /public/new/sellerCenter/RequestTaxInvoice/api` > ส่งคำร้องขอใบกำกับภาษี เริ่มส่งหลังจาก Payment Success และสามารถส่งอัพเดทได้เรื่อยๆ จนกว่า seller จะส่งใบกำกับภาษีมา **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | SellerId (*required*) | Id seller ของทาง Seller | string | | IsJuristic (*required*) | เป็นนิติบุคคล? | boolean | | IsMainBranch (*required*) | เป็นสำนักงานใหญ่? | boolean | | CodeBranch | รหัสสาขา(มีค่าเมื่อ IsMainBranch เป็น False) | string | | OrganizationName (*required*) | ชื่อบริษัท | string | | OrganizationTaxId (*required*) | เลขประจำตัวผู้เสียภาษีของบริษัท | string | | OrganizationPhone | เบอร์โทรบริษัท | string | | TaxInvoiceAddress (*required*) | ที่อยู่ออกใบกำกับภาษี | AddressDetail Object | | TaxInvoiceDeliveryAddress (*required*) | ที่อยู่จัดส่งใบกำกับภาษี | AddressDetail Object | **AddressDetail Object** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | Address (*required*) | ที่อยู่ | string | | Province (*required*) | ชื่อจังหวัด | string | | District (*required*) | ชื่ออำเภอ | string | | SubDistrict (*required*) | ชื่อตำบล | string | | PostCode (*required*) | รหัสไปรษณีย์ | string | #### Example Request ```json { "PoRefId": "491482c2-6d89-4511-9cd3-aed095853663", "SellerId": "1-1", "OrganizationName": "Rakmao Buynow", "OrganizationTaxId": "1234567890123", "OrganizationPhone": "0899999999", "IsJuristic": true, "IsMainBranch": true, "TaxInvoiceAddress": { "Address": "123 ม.4", "Province": "กรุงเทพมหานคร", "District": "บางขุนเทียน", "SubDistrict": "แสมดำ", "PostCode": "10150" }, "TaxInvoiceDeliveryAddress": { "Address": "123 ม.4", "Province": "กรุงเทพมหานคร", "District": "บางขุนเทียน", "SubDistrict": "แสมดำ", "PostCode": "10150" } } ``` ```json { "PoRefId": "491482c2-6d89-4511-9cd3-aed095853663", "SellerId": "1-1", "OrganizationName": "Rakmao Buynow", "OrganizationTaxId": "1234567890123", "OrganizationPhone": "0899999999", "IsJuristic": true, "IsMainBranch": false, "CodeBranch": "001", "TaxInvoiceAddress": { "Address": "123 ม.4", "Province": "กรุงเทพมหานคร", "District": "บางขุนเทียน", "SubDistrict": "แสมดำ", "PostCode": "10150" }, "TaxInvoiceDeliveryAddress": { "Address": "123 ม.4", "Province": "กรุงเทพมหานคร", "District": "บางขุนเทียน", "SubDistrict": "แสมดำ", "PostCode": "10150" } } ``` ## Seller Center To Rakmao (Buynow) > ทำการขอ AccessToken ที่ Rakmao ก่อน > แล้วใช้ Endpoint ของ RakmaoBuynow ### `POST /api/v1/ExternalInterface/SellerCenter/ConfirmDelivery` **Body Request** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | ConfirmTimestamp (*required*) | วันที่ยืนยันการจัดส่ง | Date | | Note | หมายเหตุการจัดส่ง/ ข้อมูลเพิ่มเติม | string | | AttachedFileList | รายการไฟล์แนบ | Array of object | | AttachedInvoiceFileList | รายการไฟล์แนบ Invoice | Array of object | **AttachedFileList Object && AttachedInvoiceFileList Object** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | AttachedFileName (*required*) | | string | | AttachedFileLink (*required*) | | string | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "ConfirmTimestamp": "2023-02-22T00:00:00.000000Z", "Note": "การจัดส่งเร็วกว่ากำหนด", "AttachedFileList": [ { "AttachedFileName" : "devivery-site-image-1.jpg", "AttachedFileLink" : "https://example.domin/path/to/file" }, { "AttachedFileName" : "devivery-site-image-2.jpg", "AttachedFileLink" : "https://example.domin/path/to/file" } ], "AttachedInvoiceFileList": [ { "AttachedFileName" : "devivery-site-image-1.jpg", "AttachedFileLink" : "https://example.domin/path/to/file" }, { "AttachedFileName" : "devivery-site-image-2.jpg", "AttachedFileLink" : "https://example.domin/path/to/file" } ] } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/RefundReview` > api **Body Request** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | RefundReviewBy (*required*) | ชื่อผู้ทำการตรวจสอบคำร้อง | string | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "RefundReviewBy" : "นายทดสอบ ระบบ" } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/RefundConfirm` > api **Body Request** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | RefundStatus (*required*) | สถานะของคำร้อง (1 = Accept , 2 = Reject) | [number](#MasterData-RefundConfirm) | | RefundReasons | รายละเอียดของการยืนยันคำร้อง | string | | RefundNote | รายละเอียดเพิ่มเติมของการยืนยันคำร้อง | string | | RefundConfirmBy (*required*) | ชื่อผู้ทำการยอมรับคำร้อง | string | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "RefundStatus" : 1, "RefundReasons" : null, "RefundNote" : null, "RefundConfirmBy" : "นายทดสอบ ระบบ", } ``` #### Example Request 2 ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "RefundStatus" : 2, "RefundReasons" : "การขนส่ง", "RefundNote" : "ไม่สามารถยกเลิกได้", "RefundConfirmBy" : "นายทดสอบ ระบบ", } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/OrderCompleteBySeller` > ยืนยันว่าคำสั่งซื้อนี้สำเร็จแล้ว **Body Request** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | CompletedTimestamp (*required*) | วันที่คำสั่งซื้อสำเร็จ | Date | | Note | หมายเหตุ | string | | AttachedFile | รายการไฟล์แนบ | object | **AttachedFile Object** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | AttachedFileName (*required*) | | string | | AttachedFileLink (*required*) | | string | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "ConfirmTimestamp": "2023-02-22T00:00:00.000000Z", "Note": "การจัดส่งเร็วกว่ากำหนด", "AttachedFile": { "AttachedFileName" : "devivery-site-image-1.jpg", "AttachedFileLink" : "https://example.domin/path/to/file" } } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/CancelOrderBuynow` > แจ้งยกเลิกคำสั่งซื้อ **Body Request** | Parameter | Description | Schema | | ------------------------- | ------------------------------------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | Status (*required*) | สถานะการยกเลิก | [number](#BuynowOrderCancelEnum) | | ActionByName (*required*) | ชื่อผู้ขอยกเลิก | string | | Reason (*required*) | เหตุผลที่ยกเลิกคำสั่งซื้อ | string | #### Example Request ```json { "PoRefId": "491482c2-6d89-4511-9cd3-aed095853663", "Status": 2, "ActionByName": "ทดสอบ ยกเลิก", "Reason": "สินค้าไม่เพียงพอ" } ``` ### `POST /api/v1/ExternalInterface/SellerCenter/UploadTaxInvoice` > upload ใบกำกับภาษี (สามารถอัพโหลดได้ครั้งเดียว) **Body Request** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | PoRefId (*required*) | Id Po ของทาง Rakmao | Guid | | AttachedFile | ไฟล์ใบกำกับภาษี | AttachedFile object | **AttachedFile Object** | Parameter | Description | Schema | | -------------------------- | ------------------- | ------ | | AttachedFileName (*required*) | | string | | AttachedFileLink (*required*) | | string | **Body Response** | Parameter | Description | Schema | | --------- | -------------------- | ------- | | Data | สถานะของการรับข้อมูล | boolean | #### Example Request ```json { "PoRefId" : "491482c2-6d89-4511-9cd3-aed095853663", "AttachedFile": { "AttachedFileName" : "ใบกำกับภาษีบริษัท Rakmao Buynow.pdf", "AttachedFileLink" : "https://example.domin/path/to/file" } } ``` #### Example Response ```json { "Status": 200, "Message": "success", "Data": true } ``` ## MasterData RefundConfirm | Status | StatusName | | -------- | ------------| | 1 | Accept | | 2 | Reject | ## MasterDataPayMethod | Status | StatusName | | -------- | ------------| | 1 | QrCode | | 2 | CreditCard | | 3 | Installment | | 5 | CreditTerm | | 6 | PayDirectly | | 7 | Jfin | | 8 | Saison | | 9 | EasyMoney | | 10 | Paysoon | | 11 | SiamValidus | ## PayMethodReceiving | Status | StatusName | | -------- | ------------| | 1 | PayDirectly | | 2 | PaymentGateway | | 3 | CreditPah | | 4 | CreditSaison | | 5 | Paysoon (Direct PO) | | 6 | PaymentGateway (Direct PO) | | 7 | SiamValidus | | 8 | Vyvr | ## Bidding status | BiddingId| BiddingName | | -------- | ------------| | 1 | ไม่ต้องการเสนอราคา| | 2 | กลับมาเสนอราคา | ## MasterData Inquiries | InquiryId| InquiryName | | -------- | ------------| | 1 | ข้อมูลสินค้า | | 2 | ข้อมูลการจัดส่ง | | 3 | ข้อมูลอื่น ๆ | ## MasterData Categories **Categories** | CategoriesId | CategoriesName | IsActive | | ------------ | ---------------------------------------- | -------- | | 1 | โครงสร้าง-ปูนซีเมนต์ | 1 | | 2 | โครงสร้าง-คอนกรีตผสมเสร็จ | 1 | | 3 | เหล็ก | 1 | | 4 | ยิปซั่มและโครงคร่าว | 1 | | 5 | Service Solution | 1 | | 6 | ฝ้า ผนัง | 1 | | 8 | แผ่นพื้น/Post Tension/เสาเข็ม | 1 | | 9 | หลังคาและอุปกรณ์ | 1 | | 10 | ท่อและรางน้ำ | 1 | | 11 | แลนด์สเคปและวัสดุปรับปรุงภูมิทัศน์ภายนอก | 1 | | 12 | กระเบื้องและสุขภัณฑ์ | 1 | | 13 | Home Improvment & DIY | 1 | | 14 | เฟอร์นิเจอร์และอุปกรณ์ตกแต่งภายใน | 1 | | 15 | เครื่องใช้ไฟฟ้า, ระบบไฟและแสงสว่าง | 1 | | 16 | อื่นๆ / ไม่ระบุ | 1 | | 17 |อุปกรณ์และเครื่องมือช่าง | 1 | 18 |กลุ่มสี | 1 | 19 |ประตูและหน้าต่าง | 1 | ## MasterData RFQProjectType | RFQProjectTypeId | RFQProjectTypeName | Logo | | ---------------- | ------------------ | ------------------------------------ | | 1 | PJM | ![](https://i.imgur.com/td2ceXP.png) | | 2 | Rakmao | ![](https://i.imgur.com/zNYP4mU.png) | | 3 | Builk | ![](https://i.imgur.com/TYWnYHz.png) | #### ShippingVatTypeEnum | Key | Value | | ---------- | ----- | | IncludeVat | 1 | | NoVat | 2 | #### SellerCategoryEnum | Key | Value | | ---------- | ----- | | Individual | 0 | | Juristic | 1 |