The product object
Attributes |
Id: int required, autogenerated, unique
The unique identifier for this product |
AllowNegativeStock: bool optional |
Archived: bool optional |
AvailableAs: Nexudus.Coworking.Core.Enums.eRecurrentProductOptions optional |
BusinessId: Id required |
CurrencyId: Id required |
CurrentStock: int? optional read-only |
Description: string required |
DisplayOrder: int required |
ExemptTaxRateId: Id optional |
FinancialAccountId: Id optional |
Name: string required |
OnlyForContacts: bool optional |
OnlyForMembers: bool optional |
Price: decimal required |
ReducedTaxRateId: Id optional |
Sku: string optional |
Starred: bool optional |
StockAlertLevel: int? optional |
SyncToSquare: bool optional |
Tags: string optional |
TaxRateId: Id optional |
TrackStock: bool optional |
Visible: bool optional |
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this product |
SystemId: string optional api-only
User defined data about this product. This property can only be seen and updated using the API. |
Json Structure Example
{
"Id": 1234567,
"AllowNegativeStock": false,
"Archived": false,
"AvailableAs": 1,
"BusinessId": 12345678,
"CurrencyId": 12345678,
"CurrentStock": ,
"Description": "Description",
"DisplayOrder": ,
"ExemptTaxRateId": 12345678,
"FinancialAccountId": 12345678,
"Name": "Name",
"OnlyForContacts": false,
"OnlyForMembers": false,
"Price": 1.2,
"ReducedTaxRateId": 12345678,
"Sku": "SKU",
"Starred": false,
"StockAlertLevel": ,
"SyncToSquare": false,
"Tags": "Tags",
"TaxRateId": 12345678,
"TrackStock": false,
"Visible": false,
"UniqueId": "8316e8da-c5bd-4667-9d6b-69f654a22475",
"SystemId": "{ metadata: { id: 887766, processed: true } }"
}
Find a Product
This endpoint allows you to GET a list of products based on one or more filter querystring parameters.
GET https://spaces.nexudus.com/api/billing/products?...
π Requires role "Product-List"
Pagination querystring parameters
Lets control how many records to return at a time and their order. |
page integer optional
?page=1 |
size integer optional default=25
Sets the maximum number of records to return each page of results. ?size=25 |
orderby string optional default=Name
Sets the property to use when ordering the results of the search. ?orderby=Id |
dir 'ascending' or 'descending' optional default=SortDirection.Ascending
Sets the direction to use when ordering the records. ?sort=ascending |
Search querystring parameters
Lets you search product records based on their different properties. |
Id number
?Id=12345678 |
Product_AllowNegativeStock bool
?Product_AllowNegativeStock=... |
Product_Archived bool
?Product_Archived=... |
Product_AvailableAs Nexudus.Coworking.Core.Enums.eRecurrentProductOptions
?Product_AvailableAs=... |
Product_Business Business
?Product_Business=... |
Product_Currency Currency
?Product_Currency=... |
Product_CurrentStock int?
?Product_CurrentStock=... |
Product_Description string
?Product_Description=... |
Product_DisplayOrder int
?Product_DisplayOrder=... |
Product_ExemptTaxRate TaxRate
?Product_ExemptTaxRate=... |
Product_FinancialAccount FinancialAccount
?Product_FinancialAccount=... |
Product_Name string
?Product_Name=... |
Product_OnlyForContacts bool
?Product_OnlyForContacts=... |
Product_OnlyForMembers bool
?Product_OnlyForMembers=... |
Product_Price decimal
?Product_Price=... |
Product_ReducedTaxRate TaxRate
?Product_ReducedTaxRate=... |
Product_Sku string
?Product_Sku=... |
Product_Starred bool
?Product_Starred=... |
Product_StockAlertLevel int?
?Product_StockAlertLevel=... |
Product_SyncToSquare bool
?Product_SyncToSquare=... |
Product_Tags string
?Product_Tags=... |
Product_TaxRate TaxRate
?Product_TaxRate=... |
Product_TrackStock bool
?Product_TrackStock=... |
Product_Visible bool
?Product_Visible=... |
Product_BusinessName string
?Product_BusinessName=... |
Product_CurrencyCode string
?Product_CurrencyCode=... |
Product_Tariffs List of Tariff
?Product_Tariffs=... |
Range search querystring parameters
Lets you search product records based on a range of date or numeric values. |
To_Product_CreatedOn date
?To_Product_CreatedOn=2010-01-01T20:32 |
From_Product_CreatedOn date
?From_Product_CreatedOn=2010-01-01T20:32 |
To_Product_UpdatedOn date
?To_Product_UpdatedOn=2010-01-01T20:32 |
From_Product_UpdatedOn date
?From_Product_UpdatedOn=2010-01-01T20:32 |
To_Product_DisplayOrder number
?To_Product_DisplayOrder=0 |
From_Product_DisplayOrder number
?From_Product_DisplayOrder=10 |
To_Product_Price number
?To_Product_Price=0 |
From_Product_Price number
?From_Product_Price=10 |
To_Product_CurrentStock number
?To_Product_CurrentStock=0 |
From_Product_CurrentStock number
?From_Product_CurrentStock=10 |
To_Product_StockAlertLevel number
?To_Product_StockAlertLevel=0 |
From_Product_StockAlertLevel number
?From_Product_StockAlertLevel=10 |
Example request
GET https://spaces.nexudus.com/api/billing/products?Product_Name=... Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
Example response
{
"Records": [{
"Id": 1234567,
"Business": ,
"Name": "Name",
"Description": "Description",
"Sku": "SKU",
"Tags": "Tags",
"DisplayOrder": ,
"Price": 1.2,
"Visible": false,
"SyncToSquare": false,
"Currency": ,
"TaxRate": ,
"ReducedTaxRate": ,
"ExemptTaxRate": ,
"FinancialAccount": ,
"AvailableAs": 1,
"OnlyForContacts": false,
"OnlyForMembers": false,
"Archived": false,
"Starred": false,
"TrackStock": false,
"AllowNegativeStock": false,
"CurrentStock": ,
"StockAlertLevel": ,
"ProductBusinessName": "...",
"ProductCurrencyCode": "...",
"CreatedOn": "2018-07-03T06:23:01Z",
"UpdatedOn": "2020-01-01T21:57:21Z",
"UpdatedBy": "System",
"UniqueId": "b69a013a-d990-4d18-b40d-22f2154c99ef",
"SystemId": "{ metadata: { id: 887766, processed: true } }"
}],
"CurrentPageSize": 25,
"CurrentPage": 1,
"CurrentOrderField": "Id",
"CurrentSortDirection": 1,
"FirstItem": 1,
"HasNextPage": true,
"HasPreviousPage": false,
"LastItem": 25,
"PageNumber": 1,
"PageSize": 25,
"TotalItems": 60,
"TotalPages": 3
}
Find Products by IDs
Gets one or more product records based on their Id.GET https://spaces.nexudus.com/api/billing/products?Product_Id=[:id1,:id2,...]
π Requires role "Product-List"
Querystring parameters |
Product_Id: array requried
?Product_Id=[12345678,87654651] |
Example request
GET https://spaces.nexudus.com/api/billing/products?Product_Id=[1234567,9876541] Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
Example response
{
"Records": [{
"Id": 1234567,
"Business": ,
"Name": "Name",
"Description": "Description",
"Sku": "SKU",
"Tags": "Tags",
"DisplayOrder": ,
"Price": 1.2,
"Visible": false,
"SyncToSquare": false,
"Currency": ,
"TaxRate": ,
"ReducedTaxRate": ,
"ExemptTaxRate": ,
"FinancialAccount": ,
"AvailableAs": 1,
"OnlyForContacts": false,
"OnlyForMembers": false,
"Archived": false,
"Starred": false,
"TrackStock": false,
"AllowNegativeStock": false,
"CurrentStock": ,
"StockAlertLevel": ,
"ProductBusinessName": "...",
"ProductCurrencyCode": "...",
"CreatedOn": "2018-07-03T06:23:01Z",
"UpdatedOn": "2020-01-01T21:57:21Z",
"UpdatedBy": "System",
"UniqueId": "428a7ab3-5f0b-4693-bb8b-11b97ad2e8cf",
"SystemId": "{ metadata: { id: 887766, processed: true } }"
}],
"CurrentPageSize": 25,
"CurrentPage": 1,
"CurrentOrderField": "Name",
"CurrentSortDirection": 1,
"FirstItem": 1,
"HasNextPage": true,
"HasPreviousPage": false,
"LastItem": 1,
"PageNumber": 1,
"PageSize": 25,
"TotalItems": 1,
"TotalPages": 1
}
Get single Product by Id
Gets one product record by its Id.GET https://spaces.nexudus.com/api/billing/products/:Id
π Requires role "Product-Read"
URL parameters |
Id: number requried |
Example request
GET https://spaces.nexudus.com/api/billing/products/1234567 Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
Example response
{
"Id": 1234567,
"AllowNegativeStock": false,
"Archived": false,
"AvailableAs": 1,
"BusinessId": 12345678,
"CurrencyId": 12345678,
"CurrentStock": ,
"Description": "Description",
"DisplayOrder": ,
"ExemptTaxRateId": 12345678,
"FinancialAccountId": 12345678,
"Name": "Name",
"OnlyForContacts": false,
"OnlyForMembers": false,
"Price": 1.2,
"ReducedTaxRateId": 12345678,
"Sku": "SKU",
"Starred": false,
"StockAlertLevel": ,
"SyncToSquare": false,
"Tags": "Tags",
"TaxRateId": 12345678,
"TrackStock": false,
"Visible": false,
"CreatedOn": "2018-07-03T06:23:01Z",
"UpdatedOn": "2020-01-01T21:57:21Z",
"UpdatedBy": "System",
"UniqueId": "6ca6eb27-fb76-476f-8aa3-77555fd1360d",
"SystemId": "{ metadata: { id: 887766, processed: true } }"
}
Create new Product
Creates a new product.POST https://spaces.nexudus.com/api/billing/products
π Requires role "Product-Create"
Body parameters |
BusinessId: number required |
Name: string required |
Description: string required |
Sku: string optional |
Tags: string optional |
DisplayOrder: int required |
Price: decimal required |
Visible: bool optional |
SyncToSquare: bool optional |
CurrencyId: number required |
TaxRateId: number optional |
ReducedTaxRateId: number optional |
ExemptTaxRateId: number optional |
FinancialAccountId: number optional |
AvailableAs: Nexudus.Coworking.Core.Enums.eRecurrentProductOptions optional |
OnlyForContacts: bool optional |
OnlyForMembers: bool optional |
Archived: bool optional |
Starred: bool optional |
TrackStock: bool optional |
AllowNegativeStock: bool optional |
StockAlertLevel: int? optional |
Example request
POST https://spaces.nexudus.com/api/billing/products Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
{
"BusinessId": 12345678,
"Name": "Name",
"Description": "Description",
"Sku": "SKU",
"Tags": "Tags",
"DisplayOrder": ,
"Price": 1.2,
"Visible": false,
"SyncToSquare": false,
"CurrencyId": 12345678,
"TaxRateId": 12345678,
"ReducedTaxRateId": 12345678,
"ExemptTaxRateId": 12345678,
"FinancialAccountId": 12345678,
"AvailableAs": 1, //(check Enumerated values section below)
"OnlyForContacts": false,
"OnlyForMembers": false,
"Tariffs": [12345678, 87654321],
"Archived": false,
"Starred": false,
"TrackStock": false,
"AllowNegativeStock": false,
"StockAlertLevel": ,
}
Example valid response
{
"Status": 200,
"WasSuccessful": true,
"Message": "Record 'Name of the record' has been succesfully created.",
"Value": {
"Id": 12354678
}
}
Example invalid response
{
"Status": 500,
"Message": "Name: may not be null or empty",
"Value": null,
"WasSuccessful": false,
"Errors": [
{
"AttemptedValue": null,
"Message": "may not be null or empty",
"PropertyName": "Name"
},
]
}
Update Product
Updates an existing product.PUT https://spaces.nexudus.com/api/billing/products
PUT requests require ALL record properties to be submitted with every request. Any missing properties will be cleared or set to false.
π Requires role "Product-Edit"
Body parameters |
Id: number required
The unique Id of the product to update. |
BusinessId: number cleared if missing |
Name: string cleared if missing |
Description: string cleared if missing |
Sku: string cleared if missing |
Tags: string cleared if missing |
DisplayOrder: int cleared if missing |
Price: decimal cleared if missing |
Visible: bool cleared if missing |
SyncToSquare: bool cleared if missing |
CurrencyId: number cleared if missing |
TaxRateId: number cleared if missing |
ReducedTaxRateId: number cleared if missing |
ExemptTaxRateId: number cleared if missing |
FinancialAccountId: number cleared if missing |
AvailableAs: Nexudus.Coworking.Core.Enums.eRecurrentProductOptions cleared if missing |
OnlyForContacts: bool cleared if missing |
OnlyForMembers: bool cleared if missing |
Archived: bool cleared if missing |
Starred: bool cleared if missing |
TrackStock: bool cleared if missing |
AllowNegativeStock: bool cleared if missing |
StockAlertLevel: int? cleared if missing |
Example request
PUT https://spaces.nexudus.com/api/billing/products Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
{
"Id": 12345678,
"BusinessId": 12345678,
"Name": "Name",
"Description": "Description",
"Sku": "SKU",
"Tags": "Tags",
"DisplayOrder": ,
"Price": 1.2,
"Visible": false,
"SyncToSquare": false,
"CurrencyId": 12345678,
"TaxRateId": 12345678,
"ReducedTaxRateId": 12345678,
"ExemptTaxRateId": 12345678,
"FinancialAccountId": 12345678,
"AvailableAs": 1, //(check Enumerated values section below)
"OnlyForContacts": false,
"OnlyForMembers": false,
"Tariffs": [12345678, 87654321],
"Archived": false,
"Starred": false,
"TrackStock": false,
"AllowNegativeStock": false,
"StockAlertLevel": ,
}
Example valid response
{
"Status": 200,
"WasSuccessful": true,
"Message": "Record 'Name of the record' has been succesfully updated.",
"Value": {
"Id": 12354678
}
}
Example invalid response
{
"Status": 500,
"Message": "Name: may not be null or empty",
"Value": null,
"WasSuccessful": false,
"Errors": [
{
"AttemptedValue": null,
"Message": "may not be null or empty",
"PropertyName": "Name"
},
]
}
Delete Product
Deletes an existing product by its Id.DELETE https://spaces.nexudus.com/api/billing/products/:Id
π Requires role "Product-Delete"
URL parameters |
Id: number required
The unique Id of the product to update. |
Example request
DELETE https://spaces.nexudus.com/api/billing/products/12345678 Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
Example valid response
{
"Status": 200,
"WasSuccessful": true,
"Message": "The record was deleted successfully.",
"Value": null,
"OpenInDialog": false,
"RedirectURL": null,
"JavaScript": null,
"Errors": null
}
Commands
Commands allow to perform actions against one or more product records. Some commands accept only one record while others can run an action for a number of records at the same time. Each command has metadata with information about how it can be used and the amount of records, if any, it needs to run.Get Commands
Get all commands available to run for product records.GET https://spaces.nexudus.com/api/billing/products/commands
Example request
GET https://spaces.nexudus.com/api/billing/products/commands Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
Example valid response
[
{
"Key": "COMMAND_KEY_1",
"Name": "Command 1 english description",
"AppliesOnlyToMultipleEntities": false,
"DisplayInDropdown": true,
"DisplayInDropdownV2": true,
"AppliesOnlyToOneEntity": false,
"AppliesOnlyToTwoEntities": false,
"DisplayInGrid": false,
"NeedsEntitiesToRun": true,
"Order": 2,
"RequiresParameters": []
},
{
"Key": "COMMAND_KEY_2",
"Name": "Command 2 english description",
"AppliesOnlyToMultipleEntities": false,
"DisplayInDropdown": true,
"DisplayInDropdownV2": true,
"AppliesOnlyToOneEntity": true,
"AppliesOnlyToTwoEntities": false,
"DisplayInGrid": true,
"NeedsEntitiesToRun": true,
"Order": 10,
"RequiresParameters":
[
{
"Name": "Parameter 1 description",
"Type": "string",
},
{
"Name": "Parameter 2 description",
"Type": "Boolean",
}
]
},
...
]
Run Command
Runs a command based on its Key and one or more product record IDs.POST https://spaces.nexudus.com/api/billing/products/runacommandπ Requires role "Product-Edit"
Example request
POST https://spaces.nexudus.com/api/billing/products/runcommand Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
{
"Ids":[1329961649],
"Parameters":
[
{
"Type": "string"
"Value":987654321
},
{
"Type": "Boolean",
"Value":true
},
...
],
"Key":"COMMAND_KEY_2"
}
Example valid response
{
"Errors": null
"JavaScript": null
"Message": "Result description"
"OpenInDialog": false
"OpenInWindow": false
"RedirectURL": null
"Status": 200
"UpdatedBy": "email@example.net"
"UpdatedOn: "2020-06-04T11:40:20Z"
"Value: {Id: 12345678}
"WasSuccessful: true
}
Enumerated values
AvailableAs
GET /api/utils/enums?name=eRecurrentProductOptions
Comments
Please sign in to leave a comment.