API

Sales APIs

GET sales/contracts/{salesContractId}

The details of a spesific sales contracts

HTTP method GET
URI https://api.rambase.net/sales/contracts/{salesContractId}
Supported formats Xml, Html, Json (ex. $format=json)
- URI parameter {salesContractId} Customer sales contract identifier
Integer, minimum 100000
Custom fields Custom fields supported
Successful HTTP status code 200
API resource identifier 3828, version 14

The following body must be added to the request. Mouse over fieldnames for description and other useful information about the fields. Note that fields in bold are required/mandatory.

Format:
1
1

The query string is placed after the resource URL, seperated with a questionmark (?). The query string is composed of a series of query parameters with values. See the page about query parameters on how to use these parameters.

$showDomainDescriptions Boolean, optional Set to "true" to include domain descriptions for fields using domain values. See the Domain values page for more information. Default value is false.
$lang String, optional Specifies the language used in the response, following the 3-letter ISO-639-1 [lll]
$access_token String, optional After successful login you get an access token which needs to be provided in all API requests. Even though it is possible to pass this token as query parameter, we recommended passing it using the HTTP request header as described in Authorization. Note that all access tokens have an expiration time.
$db String, optional Set the database/company for the request
$format String, optional Set the format of the response to use for the request. Accepted values are "xml", "html", "jsonstream", "json"
$useMinimumVersion Integer, optional Used to run a new version of an API resource when your API client is running a deprecated API resource. See the Breaking changes page for more information.
$select String, optional Use to define the fields to return in the response. Accepts a comma-separated list of field names. See the Expand and select page for more information.
$expand String, optional Use to include output fields that are not returned by default in the response. Accepts a comma-separated list of expandable field names. See the Expand and Select page for more information.
$showCustomFields Boolean, optional Set to "true" to include custom fields. Default value is false.

Read more about filters and sorting on how to use filter parameters and named filters.

Read more about filters and sorting on how to use sortable parameters

Requesting this resource will yield the following response. Mouse over fieldnames (or fieldgroups) for descriptions and other useful information about the fields. Fields colored in grey is expandable fields.

Please note that some fields may be removed from the response, based on user roles/duties/permissions.

Format:
1
<SalesContract>
2
     <SalesContractId
SalesContractId

Customer sales contract identifier

>
{Integer}</SalesContractId>
3
     <Status
Status

The current status of a customer sales contract

Possible domain values can be found here

>
{Integer}</Status>
4
     <CreatedAt
CreatedAt

Date and time of creation

>
{Datetime}</CreatedAt>
5
     <Title
Title

The title of the customer sales contract

>
{String}</Title>
6
     <Description
Description

The description of what the contract is about

>
{String}</Description>
7
     <Category
Category

The category of the contract.
Examples: Recurring sales, One-off sales and Consulting services

Possible domain values can be found here

>
{Integer}</Category>
8
     <Customer>
9
          <CustomerId
CustomerId

Customer identifier

>
{Integer}</CustomerId>
10
          <Name
Name

Name of customer (name of company or surname/familyname/lastname of a person)

>
{String}</Name>
11
          <FirstName
FirstName

Secondary name of a company or firstname of a person

>
{String}</FirstName>
12
          <Phone
Phone

Customers main phone number

This field is greyed out because it is an expandable field. You have to add $expand=Customer.Phone in your request URI to get this field

>
{String}</Phone>
13
          <Email
Email

Customers main email

This field is greyed out because it is an expandable field. You have to add $expand=Customer.Email in your request URI to get this field

>
{String}</Email>
14
          <CustomerLink
CustomerLink

Customer reference

>
{String}</CustomerLink>
15
     </Customer>
16
     <Contact
Contact

Link to the customers contact person

>
17
          <ContactId
ContactId

Contact identifier

>
{Integer}</ContactId>
18
          <FirstName
FirstName

Firstname/givenname of the contact

>
{String}</FirstName>
19
          <LastName
LastName

Surname/familyname/lastname of the contact

>
{String}</LastName>
20
          <ContactLink
ContactLink

Contact reference

>
{String}</ContactLink>
21
     </Contact>
22
     <Validity>
23
          <EffectiveDate
EffectiveDate

The start of the customer sales contract

>
{Date}</EffectiveDate>
24
          <ExpirationDate
ExpirationDate

The end of the customer sales contract

>
{Date}</ExpirationDate>
25
          <IsTerminable
IsTerminable

Specifies if the contract can be teminated or not

>
{Boolean}</IsTerminable>
26
          <TerminationNoticePeriod
TerminationNoticePeriod

The length in days of the termination period. This will not have a meaning if the contract in non-terminable

>
{Integer}</TerminationNoticePeriod>
27
          <RenewalDueDays
RenewalDueDays

The minimum number of days before EndDate where the contract can be either cancelled (if set to automatically renew) or renewed (if set to be renewed by consent)

>
{Integer}</RenewalDueDays>
28
          <RenewalDueDate
RenewalDueDate

The main and backup responsible will be alerted on this date if a notification is setup

>
{Date}</RenewalDueDate>
29
     </Validity>
30
     <Value>
31
          <Currency
Currency

Three character code following the ISO 4217 standard

>
{String}</Currency>
32
          <PeriodSpecification
PeriodSpecification

The periodic schedule of the contract.
Values:
- Month = 30 days
- Week = 7 days
- Year = 365 days
- Quarter = 90 days

Possible domain values can be found here

>
{Integer}</PeriodSpecification>
33
          <ValuePerPeriod
ValuePerPeriod

The monetary value per period

>
{Decimal}</ValuePerPeriod>
34
          <TotalValue
TotalValue

Total value calculated from value pr period

>
{Decimal}</TotalValue>
35
     </Value>
36
     <MainResponsible
MainResponsible

The link to the main responsible employee. This is also the main contact point for the contract from the customers point of view

This field is greyed out because it is an expandable field. You have to add $expand=MainResponsible in your request URI to get this field

>
37
          <EmployeeId
EmployeeId

Employee identifier

This field is greyed out because it is an expandable field. You have to add $expand=MainResponsible in your request URI to get this field

>
{Integer}</EmployeeId>
38
          <FirstName
FirstName

First name of employee

This field is greyed out because it is an expandable field. You have to add $expand=MainResponsible in your request URI to get this field

>
{String}</FirstName>
39
          <LastName
LastName

Last name of employee

This field is greyed out because it is an expandable field. You have to add $expand=MainResponsible in your request URI to get this field

>
{String}</LastName>
40
          <EmployeeLink
EmployeeLink

Employee reference

This field is greyed out because it is an expandable field. You have to add $expand=MainResponsible in your request URI to get this field

>
{String}</EmployeeLink>
41
     </MainResponsible>
42
     <BackupResponsible
BackupResponsible

Link to the PID responsible if the main responsible is not available

This field is greyed out because it is an expandable field. You have to add $expand=BackupResponsible in your request URI to get this field

>
43
          <EmployeeId
EmployeeId

Employee identifier

This field is greyed out because it is an expandable field. You have to add $expand=BackupResponsible in your request URI to get this field

>
{Integer}</EmployeeId>
44
          <FirstName
FirstName

First name of employee

This field is greyed out because it is an expandable field. You have to add $expand=BackupResponsible in your request URI to get this field

>
{String}</FirstName>
45
          <LastName
LastName

Last name of employee

This field is greyed out because it is an expandable field. You have to add $expand=BackupResponsible in your request URI to get this field

>
{String}</LastName>
46
          <EmployeeLink
EmployeeLink

Employee reference

This field is greyed out because it is an expandable field. You have to add $expand=BackupResponsible in your request URI to get this field

>
{String}</EmployeeLink>
47
     </BackupResponsible>
48
</SalesContract>
1
{
2
     "salesContract": {
3
          "salesContractId
SalesContractId

Customer sales contract identifier

":
"{Integer}",
4
          "status
Status

The current status of a customer sales contract

Possible domain values can be found here

":
"{Integer}",
5
          "createdAt
CreatedAt

Date and time of creation

":
"{Datetime}",
6
          "title
Title

The title of the customer sales contract

":
"{String}",
7
          "description
Description

The description of what the contract is about

":
"{String}",
8
          "category
Category

The category of the contract.
Examples: Recurring sales, One-off sales and Consulting services

Possible domain values can be found here

":
"{Integer}",
9
          "customer": {
10
               "customerId
CustomerId

Customer identifier

":
"{Integer}",
11
               "name
Name

Name of customer (name of company or surname/familyname/lastname of a person)

":
"{String}",
12
               "firstName
FirstName

Secondary name of a company or firstname of a person

":
"{String}",
13
               "phone
Phone

Customers main phone number

This field is greyed out because it is an expandable field. You have to add $expand=Customer.Phone in your request URI to get this field

":
"{String}",
14
               "email
Email

Customers main email

This field is greyed out because it is an expandable field. You have to add $expand=Customer.Email in your request URI to get this field

":
"{String}",
15
               "customerLink
CustomerLink

Customer reference

":
"{String}"
16
          },
17
          "contact
Contact

Link to the customers contact person

":
{
18
               "contactId
ContactId

Contact identifier

":
"{Integer}",
19
               "firstName
FirstName

Firstname/givenname of the contact

":
"{String}",
20
               "lastName
LastName

Surname/familyname/lastname of the contact

":
"{String}",
21
               "contactLink
ContactLink

Contact reference

":
"{String}"
22
          },
23
          "validity": {
24
               "effectiveDate
EffectiveDate

The start of the customer sales contract

":
"{Date}",
25
               "expirationDate
ExpirationDate

The end of the customer sales contract

":
"{Date}",
26
               "isTerminable
IsTerminable

Specifies if the contract can be teminated or not

":
"{Boolean}",
27
               "terminationNoticePeriod
TerminationNoticePeriod

The length in days of the termination period. This will not have a meaning if the contract in non-terminable

":
"{Integer}",
28
               "renewalDueDays
RenewalDueDays

The minimum number of days before EndDate where the contract can be either cancelled (if set to automatically renew) or renewed (if set to be renewed by consent)

":
"{Integer}",
29
               "renewalDueDate
RenewalDueDate

The main and backup responsible will be alerted on this date if a notification is setup

":
"{Date}"
30
          },
31
          "value": {
32
               "currency
Currency

Three character code following the ISO 4217 standard

":
"{String}",
33
               "periodSpecification
PeriodSpecification

The periodic schedule of the contract.
Values:
- Month = 30 days
- Week = 7 days
- Year = 365 days
- Quarter = 90 days

Possible domain values can be found here

":
"{Integer}",
34
               "valuePerPeriod
ValuePerPeriod

The monetary value per period

":
"{Decimal}",
35
               "totalValue
TotalValue

Total value calculated from value pr period

":
"{Decimal}"
36
          },
37
          "mainResponsible
MainResponsible

The link to the main responsible employee. This is also the main contact point for the contract from the customers point of view

This field is greyed out because it is an expandable field. You have to add $expand=MainResponsible in your request URI to get this field

":
{
38
               "employeeId
EmployeeId

Employee identifier

This field is greyed out because it is an expandable field. You have to add $expand=MainResponsible in your request URI to get this field

":
"{Integer}",
39
               "firstName
FirstName

First name of employee

This field is greyed out because it is an expandable field. You have to add $expand=MainResponsible in your request URI to get this field

":
"{String}",
40
               "lastName
LastName

Last name of employee

This field is greyed out because it is an expandable field. You have to add $expand=MainResponsible in your request URI to get this field

":
"{String}",
41
               "employeeLink
EmployeeLink

Employee reference

This field is greyed out because it is an expandable field. You have to add $expand=MainResponsible in your request URI to get this field

":
"{String}"
42
          },
43
          "backupResponsible
BackupResponsible

Link to the PID responsible if the main responsible is not available

This field is greyed out because it is an expandable field. You have to add $expand=BackupResponsible in your request URI to get this field

":
{
44
               "employeeId
EmployeeId

Employee identifier

This field is greyed out because it is an expandable field. You have to add $expand=BackupResponsible in your request URI to get this field

":
"{Integer}",
45
               "firstName
FirstName

First name of employee

This field is greyed out because it is an expandable field. You have to add $expand=BackupResponsible in your request URI to get this field

":
"{String}",
46
               "lastName
LastName

Last name of employee

This field is greyed out because it is an expandable field. You have to add $expand=BackupResponsible in your request URI to get this field

":
"{String}",
47
               "employeeLink
EmployeeLink

Employee reference

This field is greyed out because it is an expandable field. You have to add $expand=BackupResponsible in your request URI to get this field

":
"{String}"
48
          }
49
     }
50
}

List of available operations/actions for this resource.
See the operations documentation for more information about API operations.

Possible error codes the response might return:

Error 102738 HTTP 404 Price list not found
Error 100055 HTTP 403 You have only admittance to your own objects