Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tip

Available from CRM.COM R13.0.0

Excerpt

This method performs a sales of physical goods for an account owner. Multiple traceable and non-traceable physical goods can be sold within a single call.

...

Name

Type

Description

token

String

The token retrieved from the login method

accounts_receivable_identifier

(mandatory)

Accounts Receivable Identifier

The identifier of the accounts receivable from which the money will be transferred. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier
V4:accounts_receivable_identifier

type_identifier

(optional)

Financial transaction type identifier

The financial transaction type of the sale's invoice. The allowed financial transaction type identifier field are the following:

Include Page
V4:financial_transaction_type_identifier
V4:financial_transaction_type_identifier

category_identifier

(optional)

Financial transaction category identifier

The financial transaction category of the sales invoice. The allowed financial transaction category identifier fields are the following:

Include Page
V4:financial_transaction_category_identifier
V4:financial_transaction_category_identifier

due_on

(optional)

DateThe date that the credit period for that specific invoice is ending.

intended_currency_identifier

(optional)

Currency Identifier

The currency that the user was intended to use for the invoice. If specified then it is validated against the currency of the specified accounts receivable and if they don't match then an error is thrown. Note that the intended currency is not saved within CRM.COM; it is just used for validation purposes. The allowed currency identifier fields are the following:

Include Page
V4:currency_identifier
V4:currency_identifier

notes

(optional)

StringShared notes for the sales invoice

back_office_code

(optional)

String

A back office code for the sales invoice. If specified then it should be unique

 

udf_string_1

(optional)

String

User Defined Field of type String

udf_string_2

(optional)

String

User Defined Field of type String

udf_string_3

(optional)

String

User Defined Field of type String

udf_string_4

(optional)

String

User Defined Field of type String

udf_string_5

(optional)

String

User Defined Field of type String

udf_string_6

(optional)

String

User Defined Field of type String

udf_string_7

(optional)

String

User Defined Field of type String

udf_string_8

(optional)

String

User Defined Field of type String

udf_float_1

(optional)

Float

User Defined Field of type Float

udf_float_2

(optional)

Float

User Defined Field of type Float

udf_float_3

(optional)

Float

User Defined Field of type Float

udf_float_4

(optional)

Float

User Defined Field of type Float

udf_date_1

(optional)

Date

User Defined Field of type Date

udf_date_2

(optional)

Date

User Defined Field of type Date

udf_date_3

(optional)

Date

User Defined Field of type Date

udf_date_4

(optional)

Date

User Defined Field of type Date

quick_sale_items_set

(mandatory)

Set of invoice item objectsThe physical goods sold to the account owner through this sale

fields_set

(optional)

List of Strings, comma separated A list of fields that should be included in the results. If not specified then all the available fields will be returned

...

Expand
titleExample 1

HTTP Method: Post

 

Request:


Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
 {
   "token":"{{token}}",
   "accounts_receivable_identifier":{"number":"ACR0000012263"},
   "type_identifier":{"name":"Invoice"},
   "life_cycle_state":"POSTED",
   "category_identifier":{"name":"Invoice Categories"},
   "notes":"to be issued later",
   "udf_string_1":"udf string 1",
   "udf_string_2":"udf string 2",
   "udf_string_3":"udf string 3",
   "udf_string_4":"udf string 4",
   "udf_string_5":"udf string 5",
   "udf_string_6":"udf string 6",
   "udf_string_7":"udf string 7",
   "udf_string_8":"udf string 8",
   "udf_float_1":10,
   "udf_float_2":20,
   "udf_float_3":30,
   "udf_float_4":40,
   "udf_date_1":"2014-05-05T15:49:59",
   "udf_date_2":"2014-06-05T15:49:59",
   "udf_date_3":"2014-07-05T15:49:59",
   "udf_date_4":"2014-08-05T15:49:59",
   "quick_sale_items_set":
   [
      {
         "product_identifier": {"code": "Expense 1"}
      },
      {
         "product_identifier": {"code": "Antenna"},
         "quantity":3,
         "discount_percentage":5,
         "udf_string_1":"udf string 1",
         "udf_string_2":"udf string 2",
         "udf_string_3":"udf string 3",
         "udf_string_4":"udf string 4",
         "udf_string_5":"udf string 5",
         "udf_string_6":"udf string 6",
         "udf_string_7":"udf string 7",
         "udf_string_8":"udf string 8",
         "udf_float_1":10,
         "udf_float_2":20,
         "udf_float_3":30,
         "udf_float_4":40,
         "udf_date_1":"2014-05-05T15:49:59",
         "udf_date_2":"2014-06-05T15:49:59",
         "udf_date_3":"2014-07-05T15:49:59",
         "udf_date_4":"2014-08-05T15:49:59"
       },
 {
         "product_identifier": {"code": "Installation Kit"},
         "installed_item_identifier":{"serial_number": "IK_0001x"},
         "price_plan": {"code": "CPricePlan"},
         "udf_string_1":"udf string 1",
         "udf_string_2":"udf string 2",
         "udf_string_3":"udf string 3",
         "udf_string_4":"udf string 4",
         "udf_string_5":"udf string 5",
         "udf_string_6":"udf string 6",
         "udf_string_7":"udf string 7",
         "udf_string_8":"udf string 8",
         "udf_float_1":10,
         "udf_float_2":20,
         "udf_float_3":30,
         "udf_float_4":40,
         "udf_date_1":"2014-05-05T15:49:59",
         "udf_date_2":"2014-06-05T15:49:59",
         "udf_date_3":"2014-07-05T15:49:59",
         "udf_date_4":"2014-08-05T15:49:59"
       }
    ]
}


Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
  "data": {
    "quick_sale_items_set": [
      {
        "product": {
          "code": "Installation Kit",
          "product_type": {
            "service_type": null,
            "used_for_provisioning": true,
            "alternative_code": "IK",
            "composition_method": "FIXEDBUNDLE",
            "name": "Installation Kit",
            "description": "Provisioning Installation kit that can include traceable and non traceable products",
            "id": "380C41872DA048DEB1D57CF67D7550F6",
            "classification": "PHYSICALGOODS",
            "physical_good_type": "TRACEABLE"
          },
          "alternative_code": "IK",
          "description": "Installation Kit",
          "id": "D970FFF8F63F4A489108FB60A69657D1"
        },
        "installed_item": {
          "product": {
            "code": "Installation Kit",
            "product_type": {
              "service_type": null,
              "used_for_provisioning": true,
              "alternative_code": "IK",
              "composition_method": "FIXEDBUNDLE",
              "name": "Installation Kit",
              "description": "Provisioning Installation kit that can include traceable and non traceable products",
              "id": "380C41872DA048DEB1D57CF67D7550F6",
              "classification": "PHYSICALGOODS",
              "physical_good_type": "TRACEABLE"
            },
            "alternative_code": "IK",
            "description": "Installation Kit",
            "id": "D970FFF8F63F4A489108FB60A69657D1"
          },
          "alternative_code": "IK_0001x",
          "serial_number": "IK_0001x",
          "id": "47775A48DE41455AA1E02224C3D0B9AD",
          "state": "EFFECTIVE"
        },
        "quantity": 1,
        "stock_out_warehouse_transaction": {
          "number": "2415",
          "batch_number": null,
          "id": "1B279BEB03294E06BDF17E0F7488BF2D",
          "life_cycle_state": "POSTED"
        }
      },
      {
        "product": {
          "code": "Antenna",
          "product_type": {
            "service_type": null,
            "used_for_provisioning": false,
            "alternative_code": "001",
            "composition_method": "FLAT",
            "name": "Equipment",
            "description": null,
            "id": "EQ",
            "classification": "PHYSICALGOODS",
            "physical_good_type": "NONTRACEABLE"
          },
          "alternative_code": "A",
          "description": "Antenna",
          "id": "872C558604704AA29D8512A70B608573"
        },
        "installed_item": null,
        "quantity": 3,
        "stock_out_warehouse_transaction": null
      }
    ],
    "accounts_receivable": {
      "number": "ACR0000012263",
      "name": "ACR0000012263",
      "id": "828C4BC409DF4E5AAD2EA1EC3E68224B",
      "life_cycle_state": "ACTIVE",
      "account_owner": {
        "company_profile": null,
        "company_name": null,
        "name": null,
        "last_name": "Kyriakou",
        "id": "E4C44CF8ECBE4218B755EC2B490907C6",
        "life_cycle_state": "FINANCIAL",
        "middle_name": null,
        "title": null,
        "type": "PERSON",
        "first_name": "Stella",
        "demographics": {
          "name_day": {
            "month": null,
            "day": null
          },
          "id_number": null,
          "gender": null,
          "date_of_birth": {
            "month": null,
            "year": null,
            "day": null
          },
          "industry_sector": null,
          "passport_number": null,
          "industry": null,
          "social_security_number": null,
          "id_issued_by_country": null,
          "passport_issued_by_country": null
        }
      }
    },
    "expenses_set": [
      {
        "code": "Expense 1",
        "product_type": {
          "service_type": "EXPENSE",
          "used_for_provisioning": false,
          "alternative_code": "006",
          "composition_method": "FLAT",
          "name": "Fees",
          "description": "Fees One Time Services",
          "id": "6",
          "classification": "SERVICES",
          "physical_good_type": null
        },
        "alternative_code": "E1",
        "description": "Expense 1",
        "id": "A9917A7895044BEF9499DD6958539D33"
      }
    ],
    "invoice": {
      "posted_on": "2017-07-19T21:18:42",
      "number": "I00003481",
      "total_amount": 38.5,
      "unsettled_amount": 38.5,
      "issued_on": "2017-07-19T21:18:38",
      "currency_rate_period": null,
      "id": "92795A6DF9CF4338BF3BF0DA17D652FA",
      "life_cycle_state": "POSTED",
      "outstanding_amount": 0,
      "reference_number": "7449",
      "due_on": "2017-07-21T21:18:42"
    }
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}

 

 

Expand
titleExample 2

HTTP Method: Post

 

Request:


Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
	"token":"{{token}}",
	"accounts_receivable_identifier" : {
		"number":"ACR0000012818"
	},
	"quick_sale_items_set" : [
	{
		"product_identifier": {
			"code": "Smartcard"
		},
		"from_warehouse": {
			"name": "Main Warehouse"
		},
		"to_warehouse": {
			"name": "PTN Warehouse"
		},
		"installed_items_set": [
			{
			"installed_item_identifier":{"serial_number": "ds_7738_sm_24"}
			},
			{
			"installed_item_identifier":{"serial_number": "ds_7738_sm_25"}
			}
		],
		"quantity":2
	}]
}


Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
    "data": {
        "quick_sale_items_set": [
            {
                "product": {
                    "code": "Smartcard",
                    "product_type": {
                        "meter_reading_type": null,
                        "service_type": null,
                        "used_for_provisioning": true,
                        "alternative_code": "S",
                        "udr_type": null,
                        "composition_method": "FLAT",
                        "name": "SMARTCARD",
                        "description": "SMARTCARD",
                        "id": "D6BE0209EC0149989A89972CE889DF8B",
                        "classification": "PHYSICALGOODS",
                        "physical_good_type": "TRACEABLE"
                    },
                    "alternative_code": "S",
                    "description": "Smartcard",
                    "id": "4F656ED5DAC44168B0805227881202CD",
                    "priority_level": null
                },
                "installed_item": null,
                "quantity": 2,
                "stock_out_warehouse_transaction": null
            }
        ],
        "accounts_receivable": {
            "number": "ACR0000012818",
            "name": "ACR0000012818 Zambia",
            "id": "6481F2CDA36D461480F82476A15EBB93",
            "life_cycle_state": "ACTIVE",
            "account_owner": {
                "company_profile": {
                    "tax_reference_number": null,
                    "registered_in_country": null,
                    "number_of_employees": null,
                    "annual_turnover": null,
                    "profile_year": null,
                    "registration_number": null,
                    "vat_registration_number": null,
                    "industry_sector": null,
                    "industry": null,
                    "established_date": null,
                    "vat_registered_by": null,
                    "vat_registration_date": null
                },
                "company_name": "Zambia",
                "name": null,
                "last_name": null,
                "id": "E965E2E70AC74160874EE71C5E9CB056",
                "life_cycle_state": "FINANCIAL",
                "middle_name": null,
                "title": null,
                "type": "COMPANY",
                "first_name": null,
                "demographics": null
            }
        },
        "expenses_set": [],
        "invoice": {
            "posted_on": "2018-01-04T14:57:32",
            "number": "I00006234",
            "total_amount": 20.2,
            "unsettled_amount": 20.2,
            "issued_on": "2018-01-04T14:56:56",
            "currency_rate_period": null,
            "id": "C4BCC9A343C94A4F9C0C9EF976165F90",
            "life_cycle_state": "POSTED",
            "outstanding_amount": 0,
            "reference_number": "13983",
            "due_on": "2018-09-28T00:00:00"
        }
    },
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}