POST v1/customer-assets
Creates new or updates existing customer asset. This API performs full update for an existing customer asset, so ensure that all parameters and IDs are correctly supplied when using this API for an update.
Request Information
URI Parameters
None.
Body Parameters
CustomerAssetName | Description | Type | Additional information |
---|---|---|---|
Id |
Customer Asset Id - set to 0 to create a new asset |
integer |
None. |
AssetName |
asset name (required) |
string |
Required Max length: 300 |
AssetType |
asset type - determines whether the fields ExpirationDate, DatePurchased, and PresentValue will be accepted / ignored / required |
IdNamePair |
Required |
Customer |
customer - Name is read-only |
IdNamePair |
Required |
CustomerLocation |
customer location - Name is read-only |
IdNamePair |
None. |
Status |
status - if a new asset is being created and its associated type has a DefaultStatus, then this field will be automatically set with the default status unless otherwise specified. If the associated type does not have a DefaultStatus, then it is required. |
IdNamePair |
None. |
StatusNote | string |
None. |
|
PurchasePrice |
purchase price |
decimal number |
None. |
VisibleOnPortal |
read-only - whether the CustomerAsset is visible to the customer on the partner portal |
boolean |
None. |
PresentValue |
present value - may be required (based on asset type). If the asset type does not have this field, it will be ignored. |
decimal number |
None. |
DatePurchased |
purchase date - may be required (based on asset type). If the asset type does not have this field, it will be ignored. |
date |
None. |
ExpirationDate |
expiration date - may be required (based on asset type). If the asset type does not have this field, it will be ignored. |
date |
None. |
DateCreated |
read-only - the date and time (in company time zone) when the asset was created |
date |
None. |
CreatedBy |
read-only - the person who created the asset |
IdNamePair |
None. |
LastUpdatedDate |
read-only - the date and time (in company time zone) when the asset was last updated |
date |
None. |
LastUpdatedBy |
read-only - the person who last updated the asset |
IdNamePair |
None. |
Currency |
Read-only. Currency Information. |
Currency |
None. |
CustomFields |
custom fields |
Collection of CustomField |
None. |
MaintenanceSchedule |
Maintenance Schedule |
Collection of CustomerAssetMaintenance |
None. |
Request Formats
application/json, text/json
{ "id": 1, "assetName": "sample string 2", "assetType": { "id": 1, "name": "sample string 2" }, "customer": { "id": 1, "name": "sample string 2" }, "customerLocation": { "id": 1, "name": "sample string 2" }, "status": { "id": 1, "name": "sample string 2" }, "statusNote": "sample string 3", "purchasePrice": 1.0, "visibleOnPortal": true, "presentValue": 1.0, "datePurchased": "2022-07-01T16:16:02.4304333-04:00", "expirationDate": "2022-07-01T16:16:02.4304333-04:00", "dateCreated": "2022-07-01T16:16:02.4304333-04:00", "createdBy": { "id": 1, "name": "sample string 2" }, "lastUpdatedDate": "2022-07-01T16:16:02.4304333-04:00", "lastUpdatedBy": { "id": 1, "name": "sample string 2" }, "currency": { "currencyISOCode": "sample string 1", "exchangeRate": 2.0 }, "customFields": [ { "id": 1, "name": "sample string 2", "fieldType": { "id": 1, "name": "sample string 2" }, "sourceId": 3, "value": "sample string 4", "valueText": "sample string 5", "isRequired": true }, { "id": 1, "name": "sample string 2", "fieldType": { "id": 1, "name": "sample string 2" }, "sourceId": 3, "value": "sample string 4", "valueText": "sample string 5", "isRequired": true } ], "maintenanceSchedule": [ { "id": 1, "assetId": 2, "startDate": "2022-07-01T16:16:02.4304333-04:00", "endDate": "2022-07-01T16:16:02.4304333-04:00", "notes": "sample string 3", "active": true }, { "id": 1, "assetId": 2, "startDate": "2022-07-01T16:16:02.4304333-04:00", "endDate": "2022-07-01T16:16:02.4304333-04:00", "notes": "sample string 3", "active": true } ] }
application/xml, text/xml
<CustomerAsset xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.Assets"> <AssetName>sample string 2</AssetName> <AssetType xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </AssetType> <CreatedBy xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </CreatedBy> <Currency xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_CurrencyISOCode_x003E_k__BackingField>sample string 1</d2p1:_x003C_CurrencyISOCode_x003E_k__BackingField> <d2p1:_x003C_ExchangeRate_x003E_k__BackingField>2</d2p1:_x003C_ExchangeRate_x003E_k__BackingField> </Currency> <CustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.Core"> <d2p1:CustomField> <d2p1:FieldType xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField> <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField> </d2p1:FieldType> <d2p1:Id>1</d2p1:Id> <d2p1:IsRequired>true</d2p1:IsRequired> <d2p1:Name>sample string 2</d2p1:Name> <d2p1:SourceId>3</d2p1:SourceId> <d2p1:Value>sample string 4</d2p1:Value> <d2p1:ValueText>sample string 5</d2p1:ValueText> </d2p1:CustomField> <d2p1:CustomField> <d2p1:FieldType xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField> <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField> </d2p1:FieldType> <d2p1:Id>1</d2p1:Id> <d2p1:IsRequired>true</d2p1:IsRequired> <d2p1:Name>sample string 2</d2p1:Name> <d2p1:SourceId>3</d2p1:SourceId> <d2p1:Value>sample string 4</d2p1:Value> <d2p1:ValueText>sample string 5</d2p1:ValueText> </d2p1:CustomField> </CustomFields> <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Customer> <CustomerLocation xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </CustomerLocation> <DateCreated>2022-07-01T16:16:02.4304333-04:00</DateCreated> <DatePurchased>2022-07-01T16:16:02.4304333-04:00</DatePurchased> <ExpirationDate>2022-07-01T16:16:02.4304333-04:00</ExpirationDate> <Id>1</Id> <LastUpdatedBy xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </LastUpdatedBy> <LastUpdatedDate>2022-07-01T16:16:02.4304333-04:00</LastUpdatedDate> <MaintenanceSchedule> <CustomerAssetMaintenance> <Active>true</Active> <AssetId>2</AssetId> <EndDate>2022-07-01T16:16:02.4304333-04:00</EndDate> <Id>1</Id> <Notes>sample string 3</Notes> <StartDate>2022-07-01T16:16:02.4304333-04:00</StartDate> </CustomerAssetMaintenance> <CustomerAssetMaintenance> <Active>true</Active> <AssetId>2</AssetId> <EndDate>2022-07-01T16:16:02.4304333-04:00</EndDate> <Id>1</Id> <Notes>sample string 3</Notes> <StartDate>2022-07-01T16:16:02.4304333-04:00</StartDate> </CustomerAssetMaintenance> </MaintenanceSchedule> <PresentValue>1</PresentValue> <PurchasePrice>1</PurchasePrice> <Status xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Status> <StatusNote>sample string 3</StatusNote> <VisibleOnPortal>true</VisibleOnPortal> </CustomerAsset>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
CustomerAssetName | Description | Type | Additional information |
---|---|---|---|
Id |
Customer Asset Id - set to 0 to create a new asset |
integer |
None. |
AssetName |
asset name (required) |
string |
Required Max length: 300 |
AssetType |
asset type - determines whether the fields ExpirationDate, DatePurchased, and PresentValue will be accepted / ignored / required |
IdNamePair |
Required |
Customer |
customer - Name is read-only |
IdNamePair |
Required |
CustomerLocation |
customer location - Name is read-only |
IdNamePair |
None. |
Status |
status - if a new asset is being created and its associated type has a DefaultStatus, then this field will be automatically set with the default status unless otherwise specified. If the associated type does not have a DefaultStatus, then it is required. |
IdNamePair |
None. |
StatusNote | string |
None. |
|
PurchasePrice |
purchase price |
decimal number |
None. |
VisibleOnPortal |
read-only - whether the CustomerAsset is visible to the customer on the partner portal |
boolean |
None. |
PresentValue |
present value - may be required (based on asset type). If the asset type does not have this field, it will be ignored. |
decimal number |
None. |
DatePurchased |
purchase date - may be required (based on asset type). If the asset type does not have this field, it will be ignored. |
date |
None. |
ExpirationDate |
expiration date - may be required (based on asset type). If the asset type does not have this field, it will be ignored. |
date |
None. |
DateCreated |
read-only - the date and time (in company time zone) when the asset was created |
date |
None. |
CreatedBy |
read-only - the person who created the asset |
IdNamePair |
None. |
LastUpdatedDate |
read-only - the date and time (in company time zone) when the asset was last updated |
date |
None. |
LastUpdatedBy |
read-only - the person who last updated the asset |
IdNamePair |
None. |
Currency |
Read-only. Currency Information. |
Currency |
None. |
CustomFields |
custom fields |
Collection of CustomField |
None. |
MaintenanceSchedule |
Maintenance Schedule |
Collection of CustomerAssetMaintenance |
None. |
Response Formats
application/json, text/json
{ "id": 1, "assetName": "sample string 2", "assetType": { "id": 1, "name": "sample string 2" }, "customer": { "id": 1, "name": "sample string 2" }, "customerLocation": { "id": 1, "name": "sample string 2" }, "status": { "id": 1, "name": "sample string 2" }, "statusNote": "sample string 3", "purchasePrice": 1.0, "visibleOnPortal": true, "presentValue": 1.0, "datePurchased": "2022-07-01T16:16:02.4460291-04:00", "expirationDate": "2022-07-01T16:16:02.4460291-04:00", "dateCreated": "2022-07-01T16:16:02.4460291-04:00", "createdBy": { "id": 1, "name": "sample string 2" }, "lastUpdatedDate": "2022-07-01T16:16:02.4460291-04:00", "lastUpdatedBy": { "id": 1, "name": "sample string 2" }, "currency": { "currencyISOCode": "sample string 1", "exchangeRate": 2.0 }, "customFields": [ { "id": 1, "name": "sample string 2", "fieldType": { "id": 1, "name": "sample string 2" }, "sourceId": 3, "value": "sample string 4", "valueText": "sample string 5", "isRequired": true }, { "id": 1, "name": "sample string 2", "fieldType": { "id": 1, "name": "sample string 2" }, "sourceId": 3, "value": "sample string 4", "valueText": "sample string 5", "isRequired": true } ], "maintenanceSchedule": [ { "id": 1, "assetId": 2, "startDate": "2022-07-01T16:16:02.4460291-04:00", "endDate": "2022-07-01T16:16:02.4460291-04:00", "notes": "sample string 3", "active": true }, { "id": 1, "assetId": 2, "startDate": "2022-07-01T16:16:02.4460291-04:00", "endDate": "2022-07-01T16:16:02.4460291-04:00", "notes": "sample string 3", "active": true } ] }
application/xml, text/xml
<CustomerAsset xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.Assets"> <AssetName>sample string 2</AssetName> <AssetType xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </AssetType> <CreatedBy xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </CreatedBy> <Currency xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_CurrencyISOCode_x003E_k__BackingField>sample string 1</d2p1:_x003C_CurrencyISOCode_x003E_k__BackingField> <d2p1:_x003C_ExchangeRate_x003E_k__BackingField>2</d2p1:_x003C_ExchangeRate_x003E_k__BackingField> </Currency> <CustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.Core"> <d2p1:CustomField> <d2p1:FieldType xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField> <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField> </d2p1:FieldType> <d2p1:Id>1</d2p1:Id> <d2p1:IsRequired>true</d2p1:IsRequired> <d2p1:Name>sample string 2</d2p1:Name> <d2p1:SourceId>3</d2p1:SourceId> <d2p1:Value>sample string 4</d2p1:Value> <d2p1:ValueText>sample string 5</d2p1:ValueText> </d2p1:CustomField> <d2p1:CustomField> <d2p1:FieldType xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField> <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField> </d2p1:FieldType> <d2p1:Id>1</d2p1:Id> <d2p1:IsRequired>true</d2p1:IsRequired> <d2p1:Name>sample string 2</d2p1:Name> <d2p1:SourceId>3</d2p1:SourceId> <d2p1:Value>sample string 4</d2p1:Value> <d2p1:ValueText>sample string 5</d2p1:ValueText> </d2p1:CustomField> </CustomFields> <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Customer> <CustomerLocation xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </CustomerLocation> <DateCreated>2022-07-01T16:16:02.4460291-04:00</DateCreated> <DatePurchased>2022-07-01T16:16:02.4460291-04:00</DatePurchased> <ExpirationDate>2022-07-01T16:16:02.4460291-04:00</ExpirationDate> <Id>1</Id> <LastUpdatedBy xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </LastUpdatedBy> <LastUpdatedDate>2022-07-01T16:16:02.4460291-04:00</LastUpdatedDate> <MaintenanceSchedule> <CustomerAssetMaintenance> <Active>true</Active> <AssetId>2</AssetId> <EndDate>2022-07-01T16:16:02.4460291-04:00</EndDate> <Id>1</Id> <Notes>sample string 3</Notes> <StartDate>2022-07-01T16:16:02.4460291-04:00</StartDate> </CustomerAssetMaintenance> <CustomerAssetMaintenance> <Active>true</Active> <AssetId>2</AssetId> <EndDate>2022-07-01T16:16:02.4460291-04:00</EndDate> <Id>1</Id> <Notes>sample string 3</Notes> <StartDate>2022-07-01T16:16:02.4460291-04:00</StartDate> </CustomerAssetMaintenance> </MaintenanceSchedule> <PresentValue>1</PresentValue> <PurchasePrice>1</PurchasePrice> <Status xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core"> <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField> <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField> </Status> <StatusNote>sample string 3</StatusNote> <VisibleOnPortal>true</VisibleOnPortal> </CustomerAsset>