Creates a new Contract object

Request Information

URI Parameters :

None.

Body Parameters :

contract
NameDescriptionTypeAdditional information
id

Primary key

globally unique identifier

Required

id2

id2

integer

Required

company_id

The company owner of this contract

globally unique identifier

Optionally required : company_id, company_code or company must be provided

company_code

Embedded entity "company" using ERP PK when adding/updating contract

string

Optionally required : company_id, company_code or company must be provided

company

Embedded entity "company" when adding/updating contract

company

Optionally required : company_id, company_code or company must be provided

reference

Reference

string
reference_back_office

Backoffice reference

string
reference_customer

Customer Reference

string
date_start

Start Date of the contract

date
date_end

Contract End date

date
date_cancel

Readonly , date +time when the contract goes in status Cancelled

date
date_last_invoiced

Readonly contains the last date an invoice has been generated for this contract

date
name

Name of the contract

string
description

Description of Contract

string
feelist_id

Feelist ID

globally unique identifier
article_price_label_id

Article Price Llabel Id

globally unique identifier
account_manager_user_id

FK of Account manager user

globally unique identifier
account_manager_user

Embedded entity "account_manager_user" using ERP PK when adding/updating account_manager_user

user
account_manager_user_code

Embedded entity "account_manager_user" using ERP PK when adding/updating account_manager_user

string
modified_dateutc

Readonly system field managed by database, filled with GetUtcDate when adding,updating

date
renewal_term_months

Renewal Term Months

integer

Range: inclusive between 0 and 1000000

feelist_warranty_discount

Feelist Warranty Discount

decimal number

Range: inclusive between 0 and 100

price_label_warranty_discount

Price Label Warranty Discount

decimal number

Range: inclusive between 0 and 100

driving_distance

Distance in km that are used to invoice the travel

decimal number
travel_fee_fix_discount

Discount applied when computing the fee for travel

decimal number

Request Formats :

application/json, text/json

Sample:
{
  "id": "00de75f0-cf44-4655-9536-ea725af66cae",
  "id2": 2,
  "company_id": "43afc518-d704-47e3-babe-04ec8b05aeb3",
  "company_code": "sample string 4",
  "reference": "sample string 5",
  "reference_back_office": "sample string 6",
  "reference_customer": "sample string 7",
  "date_start": "2023-03-29T03:58:06.7176861+00:00",
  "date_end": "2023-03-29T03:58:06.7176861+00:00",
  "date_cancel": "2023-03-29T03:58:06.7176861+00:00",
  "date_last_invoiced": "2023-03-29T03:58:06.7176861+00:00",
  "name": "sample string 12",
  "description": "sample string 13",
  "feelist_id": "443d1aa6-49b6-4ede-920f-0e453dd5aa13",
  "article_price_label_id": "321656e6-a87b-4a5b-b487-057e0cca6a00",
  "account_manager_user_id": "e41d5d6b-51cb-4d15-bd35-d38230c0151c",
  "account_manager_user": {
    "id": "23877367-e98c-486d-afb8-705cc926f0a9",
    "db_language_id": "71d07f5f-dda4-4ae0-9234-36c896504b45",
    "username": "sample string 3",
    "firstname": "sample string 4",
    "lastname": "sample string 5",
    "code": "sample string 6",
    "archived": true,
    "disabled": true,
    "emergency_contact": "sample string 9",
    "bankaccount": "sample string 10",
    "social_security": "sample string 11",
    "place_of_birth": "sample string 12",
    "nationality": "sample string 13",
    "functions": "sample string 14",
    "birthdate": "2023-03-29T03:58:06.7176861+00:00",
    "skype": "sample string 16",
    "notes": "sample string 17",
    "sales_organization_id": "b6059466-91b2-465a-9628-3cc1bd287094",
    "sales_organization": {
      "id": "cc90b72e-efdc-4ef1-b5ff-c47d3185e77b",
      "code": "sample string 2",
      "name": "sample string 3",
      "description": "sample string 4",
      "db_country_id": "e9078176-4fd4-4c75-a3eb-52271ad4f3e4",
      "db_currency_id": "1dc323ee-2eb2-4071-8a19-ed300deefd85",
      "db_language_id": "8a5adf46-4c24-485e-aadc-77e4321e962b",
      "accountancy_code": "sample string 8",
      "archived": true,
      "default_unit_of_measure_system_type": "sample string 10",
      "street": "sample string 11",
      "street2": "sample string 12",
      "street_number": "sample string 13",
      "zip": "sample string 14",
      "city": "sample string 15",
      "email": "sample string 16",
      "phone": "sample string 17",
      "fax": "sample string 18",
      "url": "sample string 19",
      "vat_reg_code": "sample string 20",
      "modified_dateutc": "2023-03-29T03:58:06.7176861+00:00"
    },
    "sales_organization_code": "sample string 19",
    "is_team_leader": true,
    "team_leader_user_id": "09889cde-9f85-4b48-82aa-327ff7b84b05",
    "email": "sample string 22",
    "phone": "sample string 23",
    "fax": "sample string 24",
    "mobile": "sample string 25",
    "private_email": "sample string 26",
    "private_phone": "sample string 27",
    "private_fax": "sample string 28",
    "private_mobile": "sample string 29",
    "private_street": "sample string 30",
    "private_street_number": "sample string 31",
    "private_city": "sample string 32",
    "private_zip": "sample string 33",
    "private_db_country_id": "e3d8535b-df83-4175-8c4b-d6e02813f0c9",
    "private_db_country_code": "sample string 35",
    "modified_dateutc": "2023-03-29T03:58:06.7176861+00:00",
    "allow_hero_app": true,
    "allow_sales_app": true,
    "allow_service_app": true,
    "user_group_id": "f24a6f12-acce-43bd-807a-d0f0c0f13448"
  },
  "account_manager_user_code": "sample string 17",
  "modified_dateutc": "2023-03-29T03:58:06.7176861+00:00",
  "renewal_term_months": 19,
  "feelist_warranty_discount": 20.0,
  "price_label_warranty_discount": 21.0,
  "driving_distance": 22.0,
  "travel_fee_fix_discount": 23.0
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.