Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- POST https://ws.smartbill.ro/SBORO/api/invoice
- $curl = curl_init();
- curl_setopt_array($curl, array(
- CURLOPT_URL => 'https://ws.smartbill.ro/SBORO/api/invoice',
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_ENCODING => '',
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 0,
- CURLOPT_FOLLOWLOCATION => true,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
- CURLOPT_POSTFIELDS =>' {
- "companyVatCode": "41144780",
- "client": {
- "name": "ILAB24 STUDIO S.R.L.",
- "vatCode": "41144780",
- "address": "Sos. Salaj, Nr.353a, Bl.7, Sc.2, Et.4, Ap.86",
- "isTaxPayer": false,
- "city": "Salaj",
- "county": "Salaj",
- "country": "Romania",
- "saveToDb": false
- },
- "isDraft": false,
- "issueDate": "2023-01-24",
- "seriesName": "FCT",
- "currency": "RON",
- "language": "RO",
- "precision": 2,
- "dueDate": "2023-01-30",
- "useEstimateDetails": false,
- "products": [
- {
- "name": "EM-MARINE 0.9 mm",
- "code": "000-213",
- "productDescription": "EM-MARINE 0.9 mm",
- "isDiscount": false,
- "measuringUnitName": "buc",
- "currency": "RON",
- "quantity": 1,
- "price": 1.1,
- "isTaxIncluded": true,
- "taxName": "Normala",
- "taxPercentage": 9,
- "saveToDb": false,
- "isService": false
- }
- ],
- "payment": {
- "value": 10.1,
- "type": "Ordin plata",
- "isCash": false
- }
- }',
- CURLOPT_HTTPHEADER => array(
- 'Authorization: Basic c2FsZXNAY2hpcC11YS5jb206MDAyfDc1YzA4NzU2NWY5ZmUxZjlmYjhlNDRlZGRjYzQ5OTg1',
- 'Content-Type: application/json',
- 'Cookie: JSESSIONID=95115597ba48064452532ce54702'
- ),
- ));
- $response = curl_exec($curl);
- curl_close($curl);
- echo $response;
- Получаю ответ
- {
- "key": "!.oresp@&",
- "successfully": false,
- "errorText": "Firma la care incercati sa va conectati nu mai este disponibila in Cloud.",
- "message": "",
- "id": "",
- "documentNumber": "",
- "auxDocumentNumber": "",
- "auxData": {},
- "operationExecuted": false,
- "nextStep": "",
- "cooldown": 0,
- "needsConsent": false,
- "validationInfo": {
- "productsWithNegativeProfit": 0,
- "documentsWithNegativeProfit": 0,
- "firstDateWithNegativeProfit": null
- },
- "messageList": [],
- "validationMessages": {
- "productsWithNegativeProfit": 0,
- "documentsWithNegativeProfit": 0,
- "firstDateWithNegativeProfit": null
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement