POST
/v1/vendorsPOST /v1/vendors
Scopes: vendors:vendors:write
Requires scope: vendors:vendors:write.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | no | |
businessName | string | no | |
vendorType | VendorType | no | |
notes | string | no | |
contactName | string | no | |
email | string | no | |
phone | string | no | |
fax | string | no | |
website | string | no | |
street1 | string | no | |
street2 | string | no | |
city | string | no | |
state | string | no | |
zip | string | no | |
country | string | no | |
defaultQty | integer<int32> | no | |
terms | integer<int32> | no | |
poSyncOption | POSyncOption | no | |
poConsolidationOption | POConsolidationOption | no | |
minDaysToConsolidate | integer<int32> | no | |
minHoursToConsolidate | integer<int32> | no | |
minNumOfOrderItemsToConsolidate | integer<int32> | no | |
defaultOrderStatus | integer<int32> | no | |
stopSyncOrderStatusFromVendor | boolean | no | |
stopSyncOrderStatusFromSeller | boolean | no | |
notifyVendor | boolean | no | |
poNotificationType | PONotificationType | no | |
poEmailCC | string | no | |
poSubjectTemplate | string | no | |
poEmailTemplate | string | no | |
poEmailSendAttachment | boolean | no | |
autoSyncInventoryFromFTP | boolean | no | |
ftpInventoryFileName | string | no | |
vendorInventoryTemplateName | string | no | |
updateFullProductDetails | boolean | no | |
inventorySyncBufferTimeHours | integer<int32> | no | |
webBaseURL | string | no | |
ftpProtocol | FTPProtocol | no | |
webLogin | string | no | |
webPass | string | no | |
imageFTPUser | string | no | |
imageFTPPass | string | no | |
imageFTPURL | string | no |
Response (200)
| Field | Type | Required | Description |
|---|---|---|---|
id | integer<int64> | no | |
message | string | no |
Examples
import { SolidCommerceClient } from '@solidcommerce/sdk';
const client = new SolidCommerceClient({
apiKey: process.env.SOLIDCOMMERCE_API_KEY!,
});
const { data, error } = await client.raw.POST('/v1/vendors', {
// params: { path: { id: '...' }, query: { limit: 25 } },
// body: { /* request body */ },
});
if (error) throw error;
console.log(data);