anchor.diff:  
   include::{snippets}/create-submission/http-response.adoc[]
   
  -The `location` header in the response has the URL for the created submission. You will need this when adding things to the submission.
  -
  -== Add samples
  -
  -Using the link from the submission labelled `samples:create`, `POST` a sample object:
  -
  -include::{snippets}/create-sample/curl-request.adoc[]
  -
  -
  -Note that the submission field above contains the URL to the submission, this allows the records to be linked together.
  -
  -This will return a response to show that the sample record has been created:
  -
  -include::{snippets}/create-sample/http-response.adoc[]
  -
  +The `location` header in the response has the URL for the created submission. You will need this when adding things to
  +the submission.
  +
  +== Adding samples
  +
  +We'll start by adding samples. It's a good template for adding anything to a submission - while the details in the
  +documents change, the process is the same across all types of document.
   
   === Naming samples (and everything else)
   
  
positive.code: If you need to update the information of any of the records submitted, create an new submission and add a document,
  following the same process as before. Using the same team and alias will ensure that the archive records are updated.
  
  
  == When things go wrong
  
  Successful requests will return a HTTP status code in `20X` range
  (see the <<submission_api.adoc#_http_status_codes,reference docs>>). When something goes wrong, there will be an
  error message to explain the problem. There's an explanation of each error type in the <<submission_api.adoc#_errors,reference docs>>.
  
  Errors can normally be resolved by correcting the content or format of your request. Please get in touch if the
negative.code: The examples in this walkthrough use https://en.wikipedia.org/wiki/CURL[curl] to interact with the server, but you can
  use the API with any programming language.
  
  The submission process follows these steps:
  
   1. Create a submission
   2. Add documents describing your data to the submission (samples, studies, etc...)
   3. Get feedback and amend documents if necessary
   4. Tell us the submission is ready to go
  
  At this point we will send the data to the appropriate archive or archives. They will send reports on their progress
  with your data and accessions back to us.
  
  This guide assumes some familiarity with REST APIs and the HTTP protocol.
  
  == Log in
  
  *TODO* we will add a section describing how to get an authorisation token and what to do with it.
  
  == Fetch the API root
  
  We recommend that you start from the root endpoint and follow the _links_ given in the `_links` section of the
  response, instead of hard-coding each API endpoint. This will insulate you from future changes to the submission system
  architecture or URL structure.
  
  include::{snippets}/root-endpoint/curl-request.adoc[]
  
  