POST api/supplier/upsert

Request Information

URI Parameters

None.

Body Parameters

SupplierUpsertRequest
NameDescriptionTypeAdditional information
ChildAgencyId

integer

None.

Password

string

None.

Id

integer

None.

SupplierCode

string

None.

SupplierName

string

None.

BusinessName

string

None.

SupplierType

string

None.

ContactName

string

None.

Phone

string

None.

Email

string

None.

Address

string

None.

DebtLimit

decimal number

None.

TaxCode

string

None.

BankAccount

string

None.

BankName

string

None.

Note

string

None.

Status

string

None.

CreatedDate

date

None.

AgencyId

integer

None.

LoginAccount

string

None.

Balance

decimal number

None.

LastTopupDate

date

None.

LastTopupAmount

decimal number

None.

GuaranteeAmount

decimal number

None.

AllowedIssueAmount

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "ChildAgencyId": 1,
  "Password": "sample string 2",
  "Id": 3,
  "SupplierCode": "sample string 4",
  "SupplierName": "sample string 5",
  "BusinessName": "sample string 6",
  "SupplierType": "sample string 7",
  "ContactName": "sample string 8",
  "Phone": "sample string 9",
  "Email": "sample string 10",
  "Address": "sample string 11",
  "DebtLimit": 12.0,
  "TaxCode": "sample string 13",
  "BankAccount": "sample string 14",
  "BankName": "sample string 15",
  "Note": "sample string 16",
  "Status": "sample string 17",
  "CreatedDate": "2026-07-14T17:58:09.3601806+07:00",
  "AgencyId": 19,
  "LoginAccount": "sample string 20",
  "Balance": 21.0,
  "LastTopupDate": "2026-07-14T17:58:09.3611815+07:00",
  "LastTopupAmount": 22.0,
  "GuaranteeAmount": 23.0,
  "AllowedIssueAmount": 24.0
}

application/xml, text/xml

Sample:
<SupplierUpsertRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SmiletripB2B.API.Models">
  <Address xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 11</Address>
  <AgencyId xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">19</AgencyId>
  <AllowedIssueAmount xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">24</AllowedIssueAmount>
  <Balance xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">21</Balance>
  <BankAccount xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 14</BankAccount>
  <BankName xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 15</BankName>
  <BusinessName xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 6</BusinessName>
  <ContactName xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 8</ContactName>
  <CreatedDate xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">2026-07-14T17:58:09.3601806+07:00</CreatedDate>
  <DebtLimit xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">12</DebtLimit>
  <Email xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 10</Email>
  <GuaranteeAmount xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">23</GuaranteeAmount>
  <Id xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">3</Id>
  <LastTopupAmount xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">22</LastTopupAmount>
  <LastTopupDate xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">2026-07-14T17:58:09.3611815+07:00</LastTopupDate>
  <LoginAccount xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 20</LoginAccount>
  <Note xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 16</Note>
  <Phone xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 9</Phone>
  <Status xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 17</Status>
  <SupplierCode xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 4</SupplierCode>
  <SupplierName xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 5</SupplierName>
  <SupplierType xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 7</SupplierType>
  <TaxCode xmlns="http://schemas.datacontract.org/2004/07/Common.Objects">sample string 13</TaxCode>
  <ChildAgencyId>1</ChildAgencyId>
  <Password>sample string 2</Password>
</SupplierUpsertRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.