Chapter 4.3.20 - Quantity

The optional Quantity field (qty) allows you to tell Communications REST v2 how many times to process a line items without have to duplicate the same item X number of times.

The Quantity field isn’t supported on these transactions:

To use the field, specify a positive value greater than 1. Setting qty to 0 defaults the quantity to 1.

Quantity Example

In this example, the quantity (qty) is set to 3, meaning that the line item is processed 3 times.

{
"cfg": {
"retnb": false,
"retext": true,
"incrf": false
},
"cmpn": {
"bscl": 1,
"svcl": 1,
"fclt": true,
"frch": true,
"reg": true
},
"inv": [
{
"bill": {
"ctry": "USA",
"st": "NC",
"cty": "Durham",
"zip": 27701
},
"cust": 1,
"date": "2018-09-24T11:00:00",
"itms": [
{
"chg": 100,
"line": 10,
"sale": 1,
"tran": 19,
"serv": 6,
"qty": 3
}
]
}
]
}

Response

The charge (chg) is set to 300, which is the charge of the line item * 3.

View the Response JSON
{
"inv": [
{
"itms": [
{
"txs": [
{
"bill": true,
"cmpl": true,
"tm": 335.417877,
"calc": 1,
"cat": "SALES AND USE TAXES",
"cid": 1,
"name": "North Carolina Telecommunications Sales Tax",
"exm": 0,
"lns": 0,
"min": 0,
"pcd": 2716900,
"taxpcd": 2757800,
"rate": 0.07,
"sur": false,
"tax": 23.47925139,
"lvl": 1,
"tid": 231,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 300
},
{
"bill": true,
"cmpl": true,
"tm": 194.7,
"calc": 1,
"cat": "CONNECTIVITY CHARGES",
"cid": 5,
"name": "FUSF (VoIP)",
"exm": 105.3,
"lns": 30,
"min": 0,
"pcd": 0,
"taxpcd": 2757800,
"rate": 0.179,
"sur": false,
"tax": 34.8513,
"lvl": 0,
"tid": 162,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 300
},
{
"bill": true,
"cmpl": true,
"tm": 194.7,
"calc": 1,
"cat": "REGULATORY CHARGES",
"cid": 6,
"name": "FCC Regulatory Fee (VoIP)",
"exm": 105.3,
"lns": 30,
"min": 0,
"pcd": 0,
"taxpcd": 2757800,
"rate": 0.00291,
"sur": false,
"tax": 0.566577,
"lvl": 0,
"tid": 226,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 300
}
]
}
]
}
]
}

Quantity Example - Multiple Line Items with Quantity 1

In this example, the same line item is repeated three times, but quantity (qty) is not specified (defaulted to 1).

{
"cfg": {
"retnb": false,
"retext": true,
"incrf": false
},
"cmpn": {
"bscl": 1,
"svcl": 1,
"fclt": true,
"frch": true,
"reg": true
},
"inv": [
{
"bill": {
"ctry": "USA",
"st": "NC",
"cty": "Durham",
"zip": 27701
},
"cust": 1,
"date": "2018-09-24T11:00:00",
"itms": [
{
"chg": 100,
"line": 10,
"sale": 1,
"tran": 19,
"serv": 6
},
{
"chg": 100,
"line": 10,
"sale": 1,
"tran": 19,
"serv": 6
},
{
"chg": 100,
"line": 10,
"sale": 1,
"tran": 19,
"serv": 6
}
],
"invm": true,
"dtl": false,
"summ": true
}
]
}

Response

The results returned total the same amounts as returned in the first example.

View the Response JSON
{
"inv": [
{
"itms": [
{
"txs": [
{
"bill": true,
"cmpl": true,
"tm": 111.805959,
"calc": 1,
"cat": "SALES AND USE TAXES",
"cid": 1,
"name": "North Carolina Telecommunications Sales Tax",
"exm": 0,
"lns": 0,
"min": 0,
"pcd": 2716900,
"taxpcd": 2757800,
"rate": 0.07,
"sur": false,
"tax": 7.82641713,
"lvl": 1,
"tid": 231,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 100
},
{
"bill": true,
"cmpl": true,
"tm": 64.9,
"calc": 1,
"cat": "CONNECTIVITY CHARGES",
"cid": 5,
"name": "FUSF (VoIP)",
"exm": 35.1,
"lns": 10,
"min": 0,
"pcd": 0,
"taxpcd": 2757800,
"rate": 0.179,
"sur": false,
"tax": 11.6171,
"lvl": 0,
"tid": 162,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 100
},
{
"bill": true,
"cmpl": true,
"tm": 64.9,
"calc": 1,
"cat": "REGULATORY CHARGES",
"cid": 6,
"name": "FCC Regulatory Fee (VoIP)",
"exm": 35.1,
"lns": 10,
"min": 0,
"pcd": 0,
"taxpcd": 2757800,
"rate": 0.00291,
"sur": false,
"tax": 0.188859,
"lvl": 0,
"tid": 226,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 100
}
]
},
{
"txs": [
{
"bill": true,
"cmpl": true,
"tm": 111.805959,
"calc": 1,
"cat": "SALES AND USE TAXES",
"cid": 1,
"name": "North Carolina Telecommunications Sales Tax",
"exm": 0,
"lns": 0,
"min": 0,
"pcd": 2716900,
"taxpcd": 2757800,
"rate": 0.07,
"sur": false,
"tax": 7.82641713,
"lvl": 1,
"tid": 231,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 100
},
{
"bill": true,
"cmpl": true,
"tm": 64.9,
"calc": 1,
"cat": "CONNECTIVITY CHARGES",
"cid": 5,
"name": "FUSF (VoIP)",
"exm": 35.1,
"lns": 10,
"min": 0,
"pcd": 0,
"taxpcd": 2757800,
"rate": 0.179,
"sur": false,
"tax": 11.6171,
"lvl": 0,
"tid": 162,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 100
},
{
"bill": true,
"cmpl": true,
"tm": 64.9,
"calc": 1,
"cat": "REGULATORY CHARGES",
"cid": 6,
"name": "FCC Regulatory Fee (VoIP)",
"exm": 35.1,
"lns": 10,
"min": 0,
"pcd": 0,
"taxpcd": 2757800,
"rate": 0.00291,
"sur": false,
"tax": 0.188859,
"lvl": 0,
"tid": 226,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 100
}
]
},
{
"txs": [
{
"bill": true,
"cmpl": true,
"tm": 111.805959,
"calc": 1,
"cat": "SALES AND USE TAXES",
"cid": 1,
"name": "North Carolina Telecommunications Sales Tax",
"exm": 0,
"lns": 0,
"min": 0,
"pcd": 2716900,
"taxpcd": 2757800,
"rate": 0.07,
"sur": false,
"tax": 7.82641713,
"lvl": 1,
"tid": 231,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 100
},
{
"bill": true,
"cmpl": true,
"tm": 64.9,
"calc": 1,
"cat": "CONNECTIVITY CHARGES",
"cid": 5,
"name": "FUSF (VoIP)",
"exm": 35.1,
"lns": 10,
"min": 0,
"pcd": 0,
"taxpcd": 2757800,
"rate": 0.179,
"sur": false,
"tax": 11.6171,
"lvl": 0,
"tid": 162,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 100
},
{
"bill": true,
"cmpl": true,
"tm": 64.9,
"calc": 1,
"cat": "REGULATORY CHARGES",
"cid": 6,
"name": "FCC Regulatory Fee (VoIP)",
"exm": 35.1,
"lns": 10,
"min": 0,
"pcd": 0,
"taxpcd": 2757800,
"rate": 0.00291,
"sur": false,
"tax": 0.188859,
"lvl": 0,
"tid": 226,
"usexm": false,
"notax": false,
"trans": 19,
"svc": 6,
"chg": 100
}
]
}
],
"summ": [
{
"max": 2147483647,
"min": 0,
"tchg": 335.417877,
"calc": 1,
"cat": "SALES AND USE TAXES",
"cid": 1,
"name": "North Carolina Telecommunications Sales Tax",
"exm": 0,
"lns": 0,
"pcd": 2716900,
"rate": 0.07,
"sur": false,
"tax": 23.47925139,
"lvl": 1,
"tid": 231
},
{
"max": 2147483647,
"min": 0,
"tchg": 194.7,
"calc": 1,
"cat": "CONNECTIVITY CHARGES",
"cid": 5,
"name": "FUSF (VoIP)",
"exm": 105.3,
"lns": 30,
"pcd": 0,
"rate": 0.179,
"sur": false,
"tax": 34.8513,
"lvl": 0,
"tid": 162
},
{
"max": 2147483647,
"min": 0,
"tchg": 194.7,
"calc": 1,
"cat": "REGULATORY CHARGES",
"cid": 6,
"name": "FCC Regulatory Fee (VoIP)",
"exm": 105.3,
"lns": 30,
"pcd": 0,
"rate": 0.00291,
"sur": false,
"tax": 0.566577,
"lvl": 0,
"tid": 226
}
]
}
]
}

See Also

Input Objects

Output Objects