إصدار ‏‎Graph API‎‏

Business Business Invoices

قراءة

The monthly invoices sent to the bill-to legal entities associated to a business.

Returns https://developers.facebook.com/docs/marketing-api/reference/omega-customer-trx/

مثال

Graph API Explorer
GET /v21.0/{business-id}/business_invoices HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{business-id}/business_invoices',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{business-id}/business_invoices",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{business-id}/business_invoices",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{business-id}/business_invoices"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
إذا كنت تريد التعرف على كيفية استخدام واجهة Graph API، يرجى قراءة ‏دليل استخدام واجهة Graph API‏.

المعلمات

معلمةالوصف
end_date
string
القيمة الافتراضية: ‏"2024-11-21"

End date for querying invoices by their billing period timestamp.

The billing period timestamp of an invoice is the first day of the month for which we're invoicing (i.e. a June 2021 invoice will have billing period of May 1st, 2021 = 2021-05-01).

Expected date format: YYYY-MM-DD.

Note: end_date is exclusive.

invoice_id
string

Corresponds to the invoice number (i.e. the "invoice_id" field on the OmegaCustomerTrx node) for a particular invoice/credit memo.

Used to query for a single invoice. If set, all other filter parameters are ignored.

issue_end_date
string
القيمة الافتراضية: ‏"2024-11-21"

End date for querying invoices by the date in which they're issued.

Expected date format: YYYY-MM-DD.

Note: issue_end_date is exclusive.

issue_start_date
string

Start date for querying invoices by the date in which they're issued.

Expected date format: YYYY-MM-DD.

Note: issue_start_date is inclusive. Also, this parameter must be set in order to query by the issue date.

root_id
int64

Corresponds to the id (i.e. the "id" field on the OmegaCustomerTrx node) for a particular invoice/credit memo.

Used to query for a single invoice. If set, all other filter parameters are ignored.

start_date
string
القيمة الافتراضية: ‏‎"First day of 6 months ago"‎‏

Start date for querying invoices by their billing period timestamp.

The billing period timestamp of an invoice is the first day of the month for which we're invoicing (i.e. a June 2021 invoice will have billing period of May 1st, 2021 = 2021-05-01).

Expected date format: YYYY-MM-DD.

Note: start_date is exclusive. Also, start_date and end_date have a default value, so if no parameters are set, invoices are queried by the billing period

type
enum {INV, CM, DM, PRO_FORMA}

Used to query invoices by their type, which can be 'INV': Invoice or 'CM': Credit Memo.

الحقول

ستؤدي القراءة من عنصر الربط هذا إلى نتيجة بتنسيق JSON:

{ "data": [], "paging": {} }

data

قائمة عُقد ‏‎OmegaCustomerTrx‎‏.

paging

لمزيد من التفاصيل عن تقسيم الصفحات، يرجى الاطلاع على ‏دليل Graph API‏.

‎Error Codes‎

خطأالوصف
200Permissions error
100Invalid parameter

إنشاء

لا يمكنك تنفيذ هذه العملية في نقطة النهاية هذه.

جارٍ التحديث

لا يمكنك تنفيذ هذه العملية في نقطة النهاية هذه.

جارٍ الحذف

لا يمكنك تنفيذ هذه العملية في نقطة النهاية هذه.