+use C4::Auth qw( check_api_auth );
+use C4::Biblio qw( GetMarcStructure );
+use C4::Output qw( output_with_http_headers );
+use Koha::Libraries;
+
+use Koha::AuthorisedValues;
+use Koha::Items;
+use Koha::ItemTypes;
+
+my $cgi = CGI->new;
+
+my ( $status, $cookie, $sessionID ) = C4::Auth::check_api_auth( $cgi, { acquisition => 'order_receive' } );
+unless ($status eq "ok") {
+ print $cgi->header(-type => 'application/json', -status => '403 Forbidden');
+ print to_json({ auth_status => $status });
+ exit 0;
+}