API

Procurement APIs

GET procurement/contracts/{purchaseContractId}

The details of a spesific purchase contract

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

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
<PurchaseContract>
2
     <PurchaseContractId
PurchaseContractId

Purchase contract identifier

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

The current status of a purchase 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 purchase contract

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

The description of what the contract is about

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

The type of the contract.
Examples: Automatic or Consent

Possible domain values can be found here

>
{Integer}</Category>
8
     <Supplier>
9
          <SupplierId
SupplierId

RamBase supplier identifier

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

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

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

Firstname/givenname if the supplier is a person

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

Main phone number of the supplier

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

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

Main email address to the supplier

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

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

Supplier reference

>
{String}</SupplierLink>
15
     </Supplier>
16
     <Contact
Contact

Link to the suppliers 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 purchase contract

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

The end of the purchase contract

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

Specifies if the contract is terminable not 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 suppliers 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
</PurchaseContract>
1
{
2
     "purchaseContract": {
3
          "purchaseContractId
PurchaseContractId

Purchase contract identifier

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

The current status of a purchase 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 purchase contract

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

The description of what the contract is about

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

The type of the contract.
Examples: Automatic or Consent

Possible domain values can be found here

":
"{Integer}",
9
          "supplier": {
10
               "supplierId
SupplierId

RamBase supplier identifier

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

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

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

Firstname/givenname if the supplier is a person

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

Main phone number of the supplier

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

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

Main email address to the supplier

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

":
"{String}",
15
               "supplierLink
SupplierLink

Supplier reference

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

Link to the suppliers 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 purchase contract

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

The end of the purchase contract

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

Specifies if the contract is terminable not 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 suppliers 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
}

Possible error codes the response might return:

Error 101304 HTTP 404 Carrier not found
Error 100053 HTTP 403 You have only admittance to your own suppliers