Sources are required to provide supporting evidence for the datapoints submitted for your project’s MRV, fine grained calculations or inventories of materials. The process below outlines how to upload a source file and attach it to a datapoint:

1

Create Source

First call the POST Source endpoint to create a source reference object. In the request, make sure to:

  • Set the __typename parameter to CreateDocumentSourceRequest
  • Include the content_length parameter (i.e. file size in bytes): this value is checked during the file upload step
  • Choose a display name: this name will be shown in the registry
  • Provide the file name of the upload: this value will be checked in the upload step

You should also decide whether the source should be publicly visible in the registry when credits are issued. Sources are hidden by default but can be made public by setting is_public to true.

2

Upload source file

The response to the above request will include a signed_upload_url field for a Google Cloud Storage bucket. To upload the source file, make a PUT request to the URL as follows:

curl
curl --request PUT \
  --url 'https://storage.googleapis.com/...' \
  --header 'Content-Type: xxx/yyy' \
  --data-binary 'local/file/path'
3

Attach to a datapoint

When creating a datapoint, sources can be attached by passing the source ID (src_xxxx) in the source_ids array.